带有 RVM 的 Mac OSX 上的 Rails 分段错误 [英] Rails Segmentation Fault on Mac OSX with RVM

查看:56
本文介绍了带有 RVM 的 Mac OSX 上的 Rails 分段错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在创建新的 rails 应用程序时,出现以下错误:

When creating a new rails app, I get the following error:

/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/http.rb:799: [BUG] Segmentation fault
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin10.8.0]

好像所有的rails文件都生成了,但是还是上面的错误.任何想法或建议将不胜感激.

All the rails files appear to be generated, but the error above is still there. Any thoughts or suggestions would be greatly appreciated.

推荐答案

在我看来像是 LLVM GCC 的问题,尝试使用 GNU GCC.

It looks to me like a problem with LLVM GCC, try with GNU GCC.

最简单的方法是安装 osx-gcc-installer 并重新安装 ruby​​:

The easiest way to do that is to install osx-gcc-installer and reinstall ruby:

rvm reinstall 1.9.3

也可以通过 HomeBrew/MacPorts 使用 gcc-4.2,安装 CommandLineTools 并按照 rvm 要求 中的说明进行操作.

it is also possible to use gcc-4.2 available via HomeBrew/MacPorts, install CommandLineTools and follow instructions from rvm requirements.

编辑 1:我在谷歌上搜索并发现了这个 http://www.seqmedia.com/2012/05/08/frustrations-abound-rvm-vs-macports-and-the-bug-segmentation-fault/ - 我记得我已经提到过 OSX 中的 openssl 坏了,最简单的检查方法是:

EDIT 1: I've googled around and come across this http://www.seqmedia.com/2012/05/08/frustrations-abound-rvm-vs-macports-and-the-bug-segmentation-fault/ - and I remember it was already mentioned to me openssl in OSX is broken, the easiest way to check it would be:

rvm get stable
rvm autolibs enable
rvm reinstall 1.9.3

这篇关于带有 RVM 的 Mac OSX 上的 Rails 分段错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆