Rails Gemfile默认为'https' - 'bundle install'失败 [英] Rails Gemfile defaults to 'https' - 'bundle install' fails

查看:120
本文介绍了Rails Gemfile默认为'https' - 'bundle install'失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我注意到当生成一个新的rails项目时,Gemfile现在默认为:

source'https:// ruby​​gems。 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 < http ,然后 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屋!

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