为什么我不能使用RVM在Lion上安装Rails?

编程入门 行业动态 更新时间:2024-10-23 16:14:39
本文介绍了为什么我不能使用RVM在Lion上安装Rails?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

尝试使用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:

  • 已安装Mac OS X Lion版本10.7(内部版本11A459e).
  • 已安装XCode 4.1 Developer Preview 5.
  • 已安装的RVM.
  • 使用命令rvm install 1.8.7通过RVM安装了1.8.7版本的Ruby.注意:我需要使用1.8.7而不是1.9.2.
  • 使用命令rvm 1.8.7切换到Ruby 1.8.7版本.
  • 使用命令rvm gemset create rails3创建了一个新的宝石集.
  • 使用命令rvm use 1.8.7@rails3切换到新的宝石集.
  • 要安装Rails,我运行了命令gem install rails,但出现以下错误:

  • Installed Mac OS X Lion Version 10.7 (Build 11A459e).
  • Installed XCode 4.1 Developer Preview 5.
  • Installed RVM.
  • Installed a 1.8.7 version of Ruby via RVM using the command rvm install 1.8.7. Note: I need to be using 1.8.7 and not 1.9.2.
  • Switched to the 1.8.7 version of Ruby using the command rvm 1.8.7.
  • Created a new gemset using the command rvm gemset create rails3.
  • Switched to the new gemset using the command 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]细分错误

    /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安装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 reinstall 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?

    本文发布于:2023-10-31 04:58:21,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1545070.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:我不   RVM   Rails   Lion

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!