简体   繁体   English

红宝石安装宝石-SSL连接返回的证书验证失败

[英]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: 我已采取以下措施来改善此问题:

  1. following this guide https://gist.github.com/luislavena/f064211759ee0f806c88 遵循本指南https://gist.github.com/luislavena/f064211759ee0f806c88
  2. which lead to this link https://guides.rubygems.org/ssl-certificate-update/#installing-using-update-packages 这导致此链接https://guides.rubygems.org/ssl-certificate-update/#installing-using-update-packages
  3. which lead to this link https://bundler.io/v1.16/guides/rubygems_tls_ssl_troubleshooting_guide.html#troubleshooting-certificate-errors 这导致此链接https://bundler.io/v1.16/guides/rubygems_tls_ssl_troubleshooting_guide.html#troubleshooting-certificate-errors

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 要么

  1. 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

  2. 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.

相关问题 Ruby rails 回形针 Seahorse::Client::NetworkingError(SSL_connect 返回=1 errno=0 状态=错误:证书验证失败) - Ruby rails paperclip Seahorse::Client::NetworkingError (SSL_connect returned=1 errno=0 state=error: certificate verify failed) 安装gems时,SSL证书验证失败 - SSL certificate verify failed when installing gems SSL_connect returned=1 errno=0 state=error: certificate verify failed 我也尝试安装 gem openssl 但不能 - SSL_connect returned=1 errno=0 state=error: certificate verify failed also I tried to install gem openssl but can't SSL_connect返回= 1 errno = 0状态= SSLv3读取服务器证书B:Mac上的证书验证失败 - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed on Mac SSL_connect 返回=1 errno=0 state=error: 证书验证失败(无法获取本地颁发者证书) - SSL_connect returned=1 errno=0 state=error: certificate verify failed (unable to get local issuer certificate) 证书错误SSL_connect返回= 1 errno = 0状态=错误:证书验证失败 - certificate Error SSL_connect returned=1 errno=0 state=error: certificate verify failed SSL_connect 返回=1 errno=0 state=SSLv3 读取服务器证书B:证书验证失败 - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed OpenSSL::SSL::SSLError: SSL_connect 返回=1 errno=0 state=error: 证书验证失败 - OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=error: certificate verify failed OpenSSL :: SSL :: SSLError-SSL_connect返回= 1 errno = 0状态= SSLv3读取服务器证书B:证书验证失败 - OpenSSL::SSL::SSLError - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed Google Oauth SSL错误 - SSL_connect返回= 1 errno = 0状态= SSLv3读取服务器证书B:证书验证失败 - Google Oauth SSL error - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM