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.
Visit https://github.com/mxcl/homebrew and read up on homebrew. You'll thank me later :)
Install homebrew with this:
ruby -e "$(curl -fsSL https://gist.github.com/raw/323731/install_homebrew.rb)"
Install XCode if you haven't already. Easiest way is to use the disk that came with your Mac.
Install git:
brew install git
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!!!
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
Install Rails
gem install rails
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.)
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
How to Generate a Human Readable Time Range Using Ruby on Rails
Differencebetween Using .Exists, and .Present? in Ruby
Yaml How Many Spaces Per Indent
Get Single Char from Console Immediately
Mocha Mock Carries to Another Test
Can You Eval Code in the Context of a Caller in Ruby
Bundle Command Not Found. Bad Interpreter
Any Success with Sinatra Working Together with Eventmachine Websockets
How to Get the Name of the Command Called for Usage Prompts in Ruby
Why Does Ruby Have Trueclass and Falseclass Instead of a Single Boolean Class
Differencebetween 'After_Create' and 'After_Save' and When to Use Which
Is There an Expect Equivalent Gem for Ruby
How to Make Part of a Regular Expression Optional in Ruby