【问题标题】:Can't complete upgrade to Rails 5 because of SSL certificate由于 SSL 证书,无法完成升级到 Rails 5
【发布时间】:2017-01-23 13:37:23
【问题描述】:

我已经进行了几个小时的升级,终于真正陷入困境。 当我收到典型的Bundler::Fetcher::CertificateFailureError 时,这一切都开始了。经过多次修补,我想我已经将所有东西都升级到了最新版本

$ gem -v
2.6.9

$ ruby -v
ruby 2.3.3p222 (2016-11-21 revision 56859) [i386-mingw32]

$ bundle -v
Bundler version 1.14.2

在某些时候,我用

更改了我的 gem 源
$ gem sources --remove http://rubygems.org
$ gem sources --add http://rubygems.org

我也将我的 Gemfile 更改为 http

当我运行 `bundle install' 时,我收到以下错误(注意,我必须手动断开 bit.ly url 才能发布错误内容)

Fetching source index from https://rails-assets.org/

Retrying fetcher due to error (2/4): Bundler::Fetcher::CertificateFailureError Could not verify the SSL certificate for https://rails-assets.org/.
There is a chance you are experiencing a man-in-the-middle attack, but most likely your system doesn't have the CA certificates needed for verification. For information about OpenSSL certificates, see http://bit. ly/ruby-ssl. To connect without using SSL, edit your Gemfile sources and change 'https' to 'http'.
Retrying fetcher due to error (3/4): Bundler::Fetcher::CertificateFailureError Could not verify the SSL certificate for https://rails-assets.org/.
There is a chance you are experiencing a man-in-the-middle attack, but most likely your system doesn't have the CA certificates needed for verification. For information about OpenSSL certificates, see http://bit. ly/ruby-ssl. To connect without using SSL, edit your Gemfile sources and change 'https' to 'http'.
Retrying fetcher due to error (4/4): Bundler::Fetcher::CertificateFailureError Could not verify the SSL certificate for https://rails-assets.org/.
There is a chance you are experiencing a man-in-the-middle attack, but most likely your system doesn't have the CA certificates needed for verification. For information about OpenSSL certificates, see http://bit. ly/ruby-ssl. To connect without using SSL, edit your Gemfile sources and change 'https' to 'http'.
Could not verify the SSL certificate for https://rails-assets.org/.
There is a chance you are experiencing a man-in-the-middle attack, but most
likely your system doesn't have the CA certificates needed for verification. For
information about OpenSSL certificates, see http://bit. ly/ruby-ssl. To connect
without using SSL, edit your Gemfile sources and change 'https' to 'http'.
enter code here

所以我又回到了我开始的地方。附带说明一下,当我尝试 https: 到我的 gem sources 时,我现在遇到了另一个错误,但在我处理完这个问题后,作为一个不同的问题可能会更好。

【问题讨论】:

    标签: ruby ssl rubygems ruby-on-rails-5


    【解决方案1】:

    如果该问题和 bitly 中的指南未修复,您可能需要重新安装。我以前遇到过这种情况,即使确保我的证书是最新的,似乎也没有任何效果;幸运的是,重新安装似乎可以解决它。

    【讨论】:

    • @cristobal - 我已经浏览过该指南的自动部分(针对比该指南中列出的版本更新的版本进行调整(但尚未通过它的手动部分进行调整) . 我还能在哪里更改 rails-assets?我的 gem sourcesGemfile 都使用 ruby​​gems.org。
    • 你在使用 RailsInstaller 吗?似乎它有这个问题,您可能必须手动更新您的 cacert(我这样做了,但它对我不起作用;但安装了 Bitnami Rubystack 的更新版本)I found a similar question
    • 现在我感觉很头疼。 ;) 我将我的代码移动到另一台工作的 Windows 机器上,最后发现“神秘的”rails-assets.org 实际上来自我的 Gemfile 中的一行。我从来不明白这个包在崩溃之前实际上是进入了那个文件。改变像@cristobal 这样的insecure.rails-assets 建议成功了。
    【解决方案2】:

    你可以更新 openssl 包

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2023-03-13
      • 2016-06-15
      • 2019-09-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多