Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Uninstall Ruby on Rails on Mac OS X 10.6

I´m trying to get RoR up and running with mysql data base, but it seems to be impossible to me (i get an error when including the mysql gem). So i tried to do a lot of things over the console with no results and i don´t remeber what i have done.

So, i want to delete everything and start again from cero. How can i delete RoR from my Mac ?

Thanks!

like image 491
mdaguerre Avatar asked Apr 01 '11 13:04

mdaguerre


People also ask

How do I completely remove Ruby on Rails from MAC?

Uninstall Ruby on Mac with rbenv For rbenv, use rbenv versions to see which versions you have installed. Use the uninstall command to remove a version. This will remove any gems associated with the version as well. If you want to reinstall Ruby, see Install Ruby on Mac for recommendations of newer version managers.

How do I uninstall old versions of Ruby?

Any gems that you install while using an RVM's ruby version, is self contained in that version. However there may come a time when you no longer want to use a particular ruby version and want to delete it along with all it's gems. Then this can be done using the “remove” command.

Where is Ruby installed on Mac?

The Ruby interpreter is often found natively on the macOS in the file paths /usr/bin/ruby or /usr/local/bin/ruby , depending on where it was installed. Ruby gems are installed and managed natively on macOS by the operating system, and using sudo gem install or making changes in those Ruby gems is discouraged.


2 Answers

The easiest way to get a basic RoR setup is to use Homebrew to install mysql and RVM to manage rails. If you follow the instructions below, including installation of RVM, you wont need to worry about already failed installations of ruby or rails because they'll basically install everything in it's own location and then repoint your environment to the new ruby and rails installation.

  1. Visit https://github.com/mxcl/homebrew and read up on homebrew. You'll thank me later :)

  2. Install homebrew with this:

    ruby -e "$(curl -fsSL https://gist.github.com/raw/323731/install_homebrew.rb)"

  3. Install XCode if you haven't already. Easiest way is to use the disk that came with your Mac.

  4. Install git:

    brew install git

  5. Install RVM: (Optional, but great if you want to use Ruby on Rails with ruby 1.9.2). Again, read up on RVM: http://rvm.beginrescueend.com/ Follow the instructions here: http://rvm.beginrescueend.com/rvm/install/ AND DONT FORGET TO DO THE POST INSTALL!!!

  6. Install 1.9.2 and set it to be the default:

    rvm install 1.9.2

    This will take a while

    rvm --default use 1.9.2

  7. Install Rails

    gem install rails

  8. Install mysql

    brew install mysql

    (When this is finished, you will need to initialize your database. The instructions will be given to you when the install finishes. If you skip this, your database won't work. If you closed your terminal and want to see the instructions again you can type "brew info mysql" and it will show them to you.)

  9. Create your rails app:

    rails new my_app

like image 74
Mike Farmer Avatar answered Sep 28 '22 03:09

Mike Farmer


Hi I had the same problem with the mysql gem and they way I succeeded was downgrading from ruby 1.9.2 to 1.8.7. I don't know which one are you using.

I uninstall ruby using port also.

Hope this could help.

Bye

like image 29
Rafael Avatar answered Sep 28 '22 03:09

Rafael