我注意到在生成新的 Rails 项目时,Gemfile 现在默认为:
source 'https://rubygems.org'
代替
source 'http://rubygems.org'
现在bundle install
对我来说失败了。当它尝试运行时,我得到:
/Users/<my user name>/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/net/http.rb:799: [BUG] Segmentation fault
如果我手动将 Gemfile 更改为 http
, 然后 bundle install
表现良好。
我的设置是否有错误(我已经在两个不同的盒子上复制了它),或者还有其他我不知道的问题?
最佳答案
您可能正在使用 MacPorts。除了本地 openssl 之外,它还会安装自己的 openssl 版本,这会导致问题。如果是这样的话, follow these instructions :
rvm remove ruby-1.9.3
rvm install ruby-1.9.3 --with-openssl-dir=/opt/local
关于ruby-on-rails - Rails Gemfile 默认为 'https' - 'bundle install' 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9136694/