I am running Lion, utilizing Xcode 4, have RVM and homebrew installed but am only able to run ruby 1.8.7
spurvis:~ rogue$ ruby -v ruby 1.8.7 (2010-01-10 p
If you're running a fresh copy of Lion & Xcode 4.2, you're going to need to install the GCC 4.2 dev libraries first - they aren't included in a fresh Xcode 4.2 install.
Then pass the CC="/usr/bin/gcc-4.2"
flag when installing your rvm.
Be sure to rvm remove
any previous installation attempts first.
Make sure you have the latest xcode available (you'll need to update it if you're running a copy from snow leopard. Update RVM rvm get head
and then try again.
I had problems compiling ree but 1.9.2 worked fine, you can try adding this function to .profile in your home directory, it'll compile with gcc (instead of the default LLVM)
# using_gcc for 64btt compiling on lion (solves compatability issues)
function using_gcc() {
env CC="/usr/bin/gcc-4.2" ARCHFLAGS="-arch x86_64" ARCHS="x86_64" $*
}
Then run using_gcc rvm install 1.9.2
If you want to get rvm install ree
with ruby 1.8.7 to work, this solved the problem for me:
# using_gcc for 32btt compiling on lion (solves compatability issues)
function using_gcc() {
env CC="/usr/bin/gcc-4.2" ARCHFLAGS="-arch x86_32" ARCHS="x86_32" $*
}
#then
using_gcc rvm install ree
Basically just changing "64" to "32" in the other answer.