问题描述
当我在Centos 5.5上为我的Rails 3项目运行 bundle install
时,它会失败并显示错误:
Gem :: RemoteFetcher :: FetchError:SSL_connect返回= 1 errno = 0状态= SSLv3
读取服务器证书B:证书验证失败
(https:// bb- m.rubygems.org/gems/multi_json-1.3.2.gem)
安装multi_json(1.3.2)时发生错误,并且Bundler无法继续。
确保`gem install multi_json -v'1.3.2'`捆绑成功。
当我尝试手动安装gem时( gem install multi_json -v '1.3.2'
)它的工作原理。其他几个宝石也会出现同样的问题。我使用RVM(1.12.3),ruby 1.9.2,bundler 1.1.3。
如何解决它? / strong>
现在我已经从这个答案挖掘出足够的业力了。每个人都应该知道这应该已经被修复了。
re:通过Ownatik再次
gem update --system
我的答案仍然正确,如果最终结果不起作用,请将其留在下方作为参考。
老实说,最好的临时解决方案是
通过用户Ownatik
它们的意思是在你的rails的 Gemfile
的顶部应用程序目录更改
源程序'https://rubygems.org'
至
来源'http://rubygems.org'
注意第二个版本是http而不是http s
When I run bundle install
for my Rails 3 project on Centos 5.5 it fails with an error:
Gem::RemoteFetcher::FetchError: SSL_connect returned=1 errno=0 state=SSLv3
read server certificate B: certificate verify failed
(https://bb-m.rubygems.org/gems/multi_json-1.3.2.gem)
An error occured while installing multi_json (1.3.2), and Bundler cannot continue.
Make sure that `gem install multi_json -v '1.3.2'` succeeds before bundling.
When I try to install the gem manually (by gem install multi_json -v '1.3.2'
) it works. The same problem occurs with several other gems. I use RVM (1.12.3), ruby 1.9.2, bundler 1.1.3.
How to fix it?
Update
Now that I've karma wh..err mined enough from this answer everyone should know that this should have been fixed.
re: via Ownatik again bundle install fails with SSL certificate verification error
gem update --system
My answer is still correct and left below for reference if that ends up not working for you.
Honestly the best temporary solution is to
via user Ownatik
what they mean is at the top of the Gemfile
in your rails application directory change
source 'https://rubygems.org'
to
source 'http://rubygems.org'
note that the second version is http instead of https
这篇关于捆绑安装失败,SSL证书验证错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!