【问题标题】:mac os - Gem giving Connection Reset while downloading Rails Errno::ECONNRESET: Connection reset by peer - SSL_connectmac os - Gem 在下载 Rails Errno::ECONNRESET 时提供连接重置:对等连接重置 - SSL_connect
【发布时间】:2018-07-28 01:58:39
【问题描述】:

Ruby 版本是 2.5.1,gem 版本是 2.7.7,今天都更新了。 OpenSSL 是 1.0.2,今天也更新了。 当我跑步时

gem install rails -v 5.2.0

我收到以下错误:

ERROR:  Could not find a valid gem 'rails' (= 5.2.0), here is why:
      Unable to download data from https://rubygems.org/ - Errno::ECONNRESET: Connection reset by peer - SSL_connect (https://api.rubygems.org/specs.4.8.gz)

我检查了所有 GitHub 问题,但没有一个有解决方案。我将证书添加到钥匙串和 openSSL 文件夹中,但似乎没有任何效果。有什么想法吗?

我还检查了我的路由器和计算机防火墙

【问题讨论】:

  • 你能检查一下 OpenSSL(1.0.2) 和 Ruby (2.5.1) 的版本兼容性吗?也许您需要更新 OpenSSL 版本。
  • @ApurvaMayank 我有最新的 openSSL 版本并且版本都兼容

标签: ruby-on-rails ruby macos openssl


【解决方案1】:

查看this question 并尝试:

$ rvm -v
# rvm 1.19.1 (stable)
$ rvm osx-ssl-certs status all
# Certificates for...
$ rvm osx-ssl-certs update all
# Updating certificates...

【讨论】:

  • 但是您有最新的 rvm 证书吗?你能展示一下rvm osx-ssl-certs status all 的产量吗?
  • 好的,我知道了,当我运行命令时,它会产生:cURL certificate bundle /usr/share/curl/curl-ca-bundle.crt not found
  • 嗯,我不知道发生了什么,但之后我运行gem install rails 并让它工作。谢谢!
猜你喜欢
  • 2014-01-06
  • 2012-01-05
  • 1970-01-01
  • 1970-01-01
  • 2011-12-30
  • 2014-04-27
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多