如何在Mac OS X Lion中安装Ruby 1.9.3?

我试图安装Ruby 1.9.3,但我有问题。
我安装了RVM,然后键入:

rvm install 1.9.3

输出说:

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

日志说:

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

我从App Store下载了新的XCode并安装它。

最佳答案
尝试使用clang编译器,而不是默认:

rvm install 1.9.3 --with-gcc=clang

转载注明原文:如何在Mac OS X Lion中安装Ruby 1.9.3? - 代码日志