Problems with Ruby on Mac OS X – Lion


When I’ve updated to Mac OS X Lion, I’ve found some error running rails application. The problem was  with my ruby installation. I got some sqlite3 errors, then I need to updated my Xcode to 4.3 version and install the Command Line Tools(Xcode->Preferences->Downloads).

After this, some errors appear:

ERROR:  Error installing sqlite3: ERROR: Failed to build gem native extension. 


try_do': The complier failed to generate an executable file. (RuntimeError) You have to install development tools first. 


Reinstall ruby

rvm reinstall 1.9.2

But you may to get this message:

The provided compiler '/usr/bin/gcc' is LLVM based, it is not yet fully supported by ruby and gems, please read `rvm requirements`.

So you can use:

rvm reinstall 1.9.2 --with-gcc=clang