Ruby install locations, or “Removing Ruby from OS X”

This is a info post for people having problems. Generally Ruby is great, but due to some old development I was doing, my gems got screwed up. The best way to fix this for me meant reinstalling OS X Leopard. This might have come from different package managers running at the same time, like Fink and MacPorts, but ultimately, I had to clean things up.

In addition to a fresh install, I also had to manually remove Ruby from seven locations on my hard drive. They are

  • /sw/lib
  • /usr/lib
  • /Library
  • /opt/local/lib
  • /System/Library/Frameworks/Ruby.framework
  • /opt/local/var/macports/sources/rsync.macports.org/release/ports/
  • /sw/fink

Now that this is done, I’m going to reinstall by

  1. installing MacPorts from their download site
  2. installing Ruby via MacPorts (“sudo port install ruby”)
  3. installing a tar of rubygems and install manually

Likely queries to end up at this page are:

  • How do I remove Ruby from OSX
  • How do I remove Ruby from OS X
  • Reinstalling Ruby
  • Reinstalling Ruby Gems
  • Gems screwed up