Thoughts on Software and Technology

Ruby Gems and Snow Leopard

I’ve been getting really grumpy lately because strange things keep happening when I try to build Ruby apps– specifically on Rails. It turns out that some of my problems weren’t due to my horrible lack of competence, but instead to the fact that the Ruby installation on Snow Leopard (installed from Xtools) had some weird things going on with regards to Gems. I thought I’d throw it up here because I tend to have problems more than once, and my blogs are as much a pensieve as they are anything.

So, the default installation of Ruby on Snow Leopard holds a set of default gems in


/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8

That’s nice, because the system comes set up for basically instant development. However, those gems are out of date, and I kept having problems installing newer versions and get gem collisions. The main source of the problem was that I couldn’t simply “gem uninstall [old-version]” because the versions in the default directory stuck around. Similarly “gem clean” wouldn’t really vacuum anything up.

My solution was simply to remove them.


sudo mv /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8 /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8.default

sudo mkdir /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8

After this, I also removed all the user gems in /Library/Ruby/Gems/1.8, just to make sure nothing was around and cleaned things up until “gem list” showed nothing. After that, I reinstalled all the gems I needed and ran “gem update –system

Now there won’t be any clash with the default gems that were installed with Snow Leopard, and I can still get to them if, for some strange reason, I need them.


No Comment

I've turned off comments on this blog. You can read all about that decision on Google+. I'm available at Google+ and Twitter for continued communication.

Comments are closed.

Powered by WordPress | Designed by Elegant Themes