我在尝试使用 RVM 在 OS X Lion 上安装 Rails 时遇到问题.
I'm running into issues trying to install Rails on OS X Lion using RVM.
到目前为止,我已经完成了以下工作:
So far, I have done the following:
要安装 Rails,我运行了命令 gem install rails,但出现以下错误:
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] 分段错误
/Users/m/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/timeout.rb:60: [BUG] Segmentation fault
尝试运行任何 gem 命令时都会发生同样的错误,所以我认为这不是 Rails 的真正问题.
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:
twitter/#!/pingles/status/66261101351927809和 github/carlhuda/bundler/issues/1058
推荐答案已修复!
答案实际上是在我上面发布的链接之一上.在安装 ruby 版本(rvm install 1.8.7)之前,我需要运行export CC=/usr/bin/gcc-4.2".有了这个,一切都顺利进行.
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.
如果不想永久导出CC,可以做CC=/usr/bin/gcc-4.2 rvm install 1.8.7
If you don't want to have CC permanently exported, you can do CC=/usr/bin/gcc-4.2 rvm install 1.8.7
如果您已经安装了 ruby 1.8.7.只需执行 CC=/usr/bin/gcc-4.2 rvm 重新安装 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
更多推荐
为什么我不能使用 RVM 在 Lion 上安装 Rails?
发布评论