remear/jewelrybox — Issue #56: Installation of ruby-1.9.3-p0 failed!
Author: farazyashar
Created: 2011-11-29 01:58:50+00:00
State: open

Compiling Ruby 1.9.3 requires a non-LLVM version of GCC, which is no longer included with XCode 4.2:

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/farazyashar/.rvm/src/ruby-1.9.3-p0':
configure: error: C compiler cannot create executables

While one could install GCC or downgrade to XCode, a simpler solution is to configure the installation to use clang, a C-family frontend for LLVM, as the compiler:

rvm install 1.9.3 --with-gcc=clang

clang's inclusion began XCode 3.2 (2009?), so perhaps the safest bet might be to include the argument by default?