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/
  • /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

Trash aware rm for OSX — never lose a file again

OK, so let’s say you’re an OSX user, and you use the command line a lot. I bet you’ve accidentally deleted a file using rm, and wished that it had gone to the Trash.

We had this problem a few days ago, and fortunately the file was under version control. But we looked for a solution that would rm into the trash. There was only one solution and it didn’t work in Leopard (10.5)

I mentioned this on Twitter, and my buddy Jason threw a working version of trash-aware-rm for OSX together in no time flat. Check it out.