I\'m running into issues trying to install Rails on OS X Lion using RVM.
So far, I have done the following:
If that still doesn't work add --force. So this becomes:
CC=/usr/bin/gcc-4.2 rvm install ruby-1.8.7 --force
Fixed it!
The answer was actually on one of the links I posted above. Before installing a version of ruby (rvm install 1.8.7) I needed to run "export CC=/usr/bin/gcc-4.2
". With that in place, everything ran smoothly.
If you don't want to have CC
permanently exported, you can do CC=/usr/bin/gcc-4.2 rvm install 1.8.7
If you have already installed ruby 1.8.7. Just do CC=/usr/bin/gcc-4.2 rvm reinstall 1.8.7
This is not related to RVM, but if what you are looking for is a local development environment for Lion you may want to give a try to RubyStack It is a free, open source all-in-one installer for Apache, MySQL, Ruby, Rails, etc. It does not require compilation and it is self-contained so if you do not like it you can simply remove the installation directory and you are done. Disclaimer: I'm one of the RubyStack developers :)
My solution was to override the /usr/bin/gcc symlink in the terminal. Here's how I did it:
https://plus.google.com/101970693023462019144/posts/eYVLvMCqTmc
This not only fixed my RVM installation, but also made sure that installing gems with native extensions (like rmagick) work.
CC=/usr/bin/gcc-4.2 rvm install 1.8.7
did not work for me, I used CC=/usr/bin/gcc rvm install 1.8.7
and it did (checking with "which gcc
")
Instead of "export CC=/usr/bin/gcc-4.2
" do "export CC=gcc
" (xCode 4.2.x should be installed).