I'm running into issues trying to install Rails on OS X Lion using RVM.
So far, I have done the following:
rvm install 1.8.7
. Note: I need to be using 1.8.7 and not 1.9.2.rvm 1.8.7
.rvm gemset create rails3
.rvm use 1.8.7@rails3
.To install Rails I ran the command gem install rails
but I got the following error:
/Users/m/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/timeout.rb:60: [BUG] Segmentation fault
The same error happens when trying to run any gem command so I don't think it's really a problem with Rails.
Judging by the links below, I don't seem to be the only person having this issue:
http://twitter.com/#!/pingles/status/66261101351927809 and https://github.com/carlhuda/bundler/issues/1058
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