RVM + Ruby 1.9.2 + Xcode 4.3

Well, had a hard time today installing some gems.
I installed Xcode 4.3 yesterday ( with it’s command line tools ) and tried to build a little test app.

I wanted to load a little data into the test app so I decided to create a Sinatra app. An iOS app without some server interaction? Boring!

UPDATE: since I wrote this post, I found a better way. Read more here.

Using RVM I installed Ruby 1.9.2 and whipped up some classy code. Looking good, ok, let’s add some gems to the Gemfile, right, save, bundle install, crash – boom -bang …
Damn. Installing the gems failed.

Failed to build gem native extension.
Could not create Makefile due to some reason,
probably lack of necessary libraries and/or headers.

After a lot of trial & error, looking up possible problems, I ended up here.
The post states that in order to install Ruby 1.9.2 on OS X Lion 10.7.3 you should specify the compiler, overriding the default setting in the process.
rvm install ruby-1.9.2-p290 --with-gcc=clang

And indeed, this solved my problem.

bundle install started working as expected.

4 thoughts on “RVM + Ruby 1.9.2 + Xcode 4.3

Leave a Reply