I haven’t tested this on all “machines” running Snow Leopard, but on the brand new one I had to get today for work, I found that the default Ruby / Gems install doesn’t support installing gems that require building native extensions. The error message I was treated to contained the following:
MacBook-Pro-de-Ethan-Garofolo:~ juanpaco$ sudo gem install thin
Password:
Building native extensions. This could take a while...
ERROR: Error installing thin:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb install thin
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ruby.h
Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/eventmachine-0.12.10 for inspection.
Results logged to /Library/Ruby/Gems/1.8/gems/eventmachine-0.12.10/ext/gem_make.out
The solution was hyper-intuitive. Install XCode. Because of course that's the first thing you think of.
I have the had the same problem – I installed XCode yesterday, but still am facing this issue. When you installed XCode, did you need to do anything to get it working?
Dang, sorry. No I didn’t. After installing XCode it all just started working.
Does the error message change for you at all?