How can I install Ruby 1.9.3 in Mac OS X Lion?

Klian picture Klian · Nov 15, 2011 · Viewed 52k times · Source

I am trying to install Ruby 1.9.3 but am having problems. I installed RVM, then typed:

rvm install 1.9.3

The output says:

ERROR: Error running ' ./configure....

The log says:

configure: WARNING: unrecognized options: --with-libyaml-dir 
checking build system type... x86_64-apple-darwin11.2.0 
checking host system type... x86_64-apple-darwin11.2.0 
checking target system type...x86_64-apple-darwin11.2.0 
checking whether the C compiler works... no
configure: error: in `/Users/myuser/.rvm/src/ruby-1.9.3-p0':
configure: error: C compiler cannot create executables See `config.log' for more details

I downloaded the new XCode from the App Store and installed it.

Answer

zzaman picture zzaman · Nov 23, 2011

Try using the clang compiler instead of the default:

rvm install 1.9.3 --with-gcc=clang