Rails Gemfile默认为'https' - 'bundle install'失败 [英] Rails Gemfile defaults to 'https' - 'bundle install' fails
问题描述
我注意到当生成一个新的rails项目时,Gemfile现在默认为:
source'https:// rubygems。 org'
而不是
source'http ://rubygems.org'
现在捆绑安装
对我而言失败。当它试图运行时,我得到:
/ Users /< my user name> /。rvm / rubies / ruby-1.9.3 -p0 / lib / ruby / 1.9.1 / net / http.rb:799:[BUG]分割错误
Gemfile < bundle install
执行正常。
您可能使用MacPorts。除了导致问题的本地openssl之外,它还会安装它自己的openssl版本。如果是这种情况, 按照这些说明 :
rvm remove ruby-1.9.3
rvm安装ruby-1.9.3 --with-openssl-dir = / opt / local
I've noticed that when generating a new rails project, the Gemfile now defaults to:
source 'https://rubygems.org'
instead of
source 'http://rubygems.org'
and now bundle install
fails for me. When it attempts to run, I get:
/Users/<my user name>/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/net/http.rb:799: [BUG] Segmentation fault
If I manually change the Gemfile to http
, then bundle install
performs fine.
Is there an error with my setup (I've replicated this on two different boxes), or is there another issue I'm not aware of?
You're probably using MacPorts. It installs its own version of openssl, in addition to your local openssl, which causes issues. If that's the case, follow these instructions:
rvm remove ruby-1.9.3
rvm install ruby-1.9.3 --with-openssl-dir=/opt/local
这篇关于Rails Gemfile默认为'https' - 'bundle install'失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!