[英]ruby install gems - SSL connect returned certificate verify failed
I am working on a rails project. 我正在从事Rails项目。 I have been working with rails for a while, and use an old MacBook Pro (2012) that has seen ruby/rails development since 2014. In that time, I have both RVM, RBENV, rails versions from 3.2 to 5.1.0, ruby versions from 2.0.0 to 2.2.3 on my machine.
我使用Rails已有一段时间,并使用了自2014年以来红宝石/导轨发展的旧MacBook Pro(2012)。那时,我同时拥有RVM,RBENV,Rails版本从3.2到5.1.0,ruby我机器上的版本是从2.0.0到2.2.3。
Recently, I have been able to get around the error 最近,我已经能够解决该错误
SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://api.rubygems.org/specs.4.8.gz)
with installing gems via http
and using source 'http://rubygems.org'
in my gemfiles. 通过
http
安装gem并在我的gemfile中使用source 'http://rubygems.org'
。
However, I would like to finally get rid of this issue. 但是,我想最终摆脱这个问题。 I have taken steps to improve this issue doing the following:
我已采取以下措施来改善此问题:
The steps I have currently taken were to do the following: brew update
我目前采取的步骤是执行以下操作:
brew update
brew install openssl-osx-ca
brew tap raggi/ale
brew upgrade openssl
However, the result of running gem update --system
returned the same error 但是,运行
gem update --system
的结果返回了相同的错误
SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://api.rubygems.org/specs.4.8.gz)
The #3 solution, suggested using rvm implode
, forcing brew uninstall openssl --force
and starting over. #3解决方案建议使用
rvm implode
,强制执行brew uninstall openssl --force
并重新开始。 I am very hesitant to do this, because I use rails in my day job and I don't want to show up (i use my machine) with a machine that cannot even turn on a rails server. 我非常犹豫,因为我在日常工作中使用了Rails,并且我不想在无法打开Rails服务器的机器上露面(我使用我的机器)。
Has anyone had to perform something similar? 是否有人必须执行类似的操作? Any actionable steps I could take to fix this SSL issue for once?
我可以采取任何可行的措施来一次性修复此SSL问题?
Try this manual install instruction https://github.com/rubygems/rubygems/blob/master/UPGRADING.rdoc#manual-install 尝试此手动安装说明https://github.com/rubygems/rubygems/blob/master/UPGRADING.rdoc#manual-install
OR 要么
Download latest rubygem package https://rubygems.org/gems/rubygems-update-2.7.7.gem 下载最新的rubygem软件包https://rubygems.org/gems/rubygems-update-2.7.7.gem
Then install it 然后安装
gem install rubygems-update-2.7.7.gem
This worked for me and for my colleagues. 这对我和我的同事都有效。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.