How to Uninstall Ruby on Rails on MAC Os X

How can I uninstall Ruby on Rails on Mac OS X?

Download RVM or RBENV and upgrade to the latest Ruby (2.3.0 at this point). Don't touch your system Ruby.

How to uninstall Ruby from /usr/local?

It's not a good idea to uninstall 1.8.6 if it's in /usr/bin. That is owned by the OS and is expected to be there.

If you put /usr/local/bin in your PATH before /usr/bin then things you have installed in /usr/local/bin will be found before any with the same name in /usr/bin, effectively overwriting or updating them, without actually doing so. You can still reach them by explicitly using /usr/bin in your #! interpreter invocation line at the top of your code.

@Anurag recommended using RVM, which I'll second. I use it to manage 1.8.7 and 1.9.1 in addition to the OS's 1.8.6.

Uninstall Ruby on Rails on Mac OS X 10.6

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

Uninstall Ruby, rbenv and homebrew and reinstall Ruby on Rails with RVM on MAC

Homebrew or Rbenv are very good tools to have as a dev, I would think twice before removing either.

In this case I doubt they are at fault.

Can you confirm you have installed the GCC command line utils for OSX by running $ xcode-select --install in your terminal.

Here is a useful post explaining that process but I find that command generally works fine for me.

If this succeeds what does your $ gem install rails output next?



Related Topics



Leave a reply



Submit