Completely reinstalling Ruby Rails and Gem on Mac OS X

howardrocks picture howardrocks · Nov 29, 2011 · Viewed 11.9k times · Source

I've recently started teaching myself Ruby on Rails, and it's all going well except I'm looking to completely reinstall Ruby, Rails and Gem.

I think I got a bit too excited at some point and deleted/modified some files or folders I shouldn't have, so I just want to get my system back to its original state so that I can reinstall the necessary Ruby, Rails and Gem bits.

I've read in places that I can install something called rvm to do this, but right now I just want to keep my system as simple as possible so that my understanding can keep up.

Any help would be appreciated.

Many thanks.

Answer

Devin M picture Devin M · Nov 30, 2011

If you are on Max OSX 10.5 and up, Ruby and RubyGems is installed with Developer Tools.

On older versions you could uninstall by running this command:

$ sudo perl /Developer/Tools/uninstall-devtools.pl

Then you just need to reboot your computer and install Developer Tools again. After that if you want to use RVM follow the instructions here. There are also some OSX specific options you should go over as well.