Ruby Gems and OSX 10.6 (Snow Leopard)

I recently upgraded to Snow Leopard. I had to fight the urge to install sooner because we had some big projects underway at work and couldn’t afford any downtime.

Due to not having time to do a complete re-install I simply did the upgrade and I must admit I am pretty impressed with how smoothly it went. When I get some more time I’ll do a clean install but I’m happy with things for now.

One of the things I am finding however is that a lot of gems that required native extensions need to be rebuilt. For a number of these things are quite obvious and its just a case of either updating or removing the gem and re-installing.

Autotest however wasn’t quite so obvious. Some gems install dependancies that required rebuilding and its not always 100% obvious like the following:

/Library/Ruby/Gems/1.8/gems/sys-uname-0.8.3/lib/sys/uname.bundle: dlopen(/Library/Ruby/Gems/1.8/gems/sys-uname-0.8.3/lib/sys/uname.bundle, 9): no suitable image found.  Did find: (LoadError)
/Library/Ruby/Gems/1.8/gems/sys-uname-0.8.3/lib/sys/uname.bundle: no matching architecture in universal wrapper - /Library/Ruby/Gems/1.8/gems/sys-uname-0.8.3/lib/sys/uname.bundle
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require'
from /Library/Ruby/Gems/1.8/gems/autotest-fsevent-0.1.1/lib/autotest/fsevent.rb:3
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in `require'
from /Users/stevesmith/.autotest:2
from /Library/Ruby/Gems/1.8/gems/ZenTest-4.1.3/lib/autotest.rb:195:in `load'
from /Library/Ruby/Gems/1.8/gems/ZenTest-4.1.3/lib/autotest.rb:195:in `initialize'
from /Library/Ruby/Gems/1.8/gems/ZenTest-4.1.3/lib/autotest.rb:194:in `each'
from /Library/Ruby/Gems/1.8/gems/ZenTest-4.1.3/lib/autotest.rb:194:in `initialize'
from /Library/Ruby/Gems/1.8/gems/autotest-rails-4.1.0/lib/autotest/rails.rb:7:in `initialize'
from /Library/Ruby/Gems/1.8/gems/ZenTest-4.1.3/lib/autotest.rb:138:in `new'
from /Library/Ruby/Gems/1.8/gems/ZenTest-4.1.3/lib/autotest.rb:138:in `run'
from /Library/Ruby/Gems/1.8/gems/ZenTest-4.1.3/bin/autotest:55
from /usr/bin/autotest:19:in `load'
from /usr/bin/autotest:19

The gem sys-uname makes use of native extensions but is obviously not reinstalled as autotest is its just assumed to already exist. In this case simply doing

sudo gem uninstall sys-uname
sudo gem install sys-uname

will bring it back. I guess this isn’t the most tricky thing to figure out but I thought I’d post it in case it was of use to anyone.


About Steve Smith
Software developer (often ruby, rails but I enjoy loads of languages), semantic tech. fanboy, skydiver, all round geek. Owner of dynamic:edge (hire us) the makers of

4 Responses to Ruby Gems and OSX 10.6 (Snow Leopard)

  1. Ryan Davis says:

    Not obvious indeed. Especially considering autotest has NOTHING to do with sys-uname.

  2. David Billskog says:

    Thanks! Very helpful.

  3. Brent MIller says:

    Thanks for saving me a bunch of time debugging this. :)

  4. Gordon Barrs says:

    Thanks for taking the time to post this. As someone who is fairly new to this Ruby malarky, it saved me a whole heap of pain.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: