我有rails 4.1.8的红宝石版本“ruby2.1.5p273 (2014-11-13修订版48405) i 386-mingw32”在windows 8中。我遵循本教程安装rails“http://installfest.railsbridge.org/installfest/windows”。不管我什么时候运行rails应用程序,我都会收到这个错误-
Fetching source index from https://rubygems.org/
Retrying source fetch due to error (2/3):Bundler::Fetcher::CertificateFailureError
Could not verify the SSL certificate for https://rubygems.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 bit.ly/ruby-ssl. To connect without using SSL, edit your Gemfile sources and change 'https' to 'http'.
Retrying source fetch due to error (3/3): Bundler::Fetcher::CertificateFailureError Could not verify the SSL certificate for https://rubygems.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 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://rubygems.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 bit.ly/ruby-ssl. To connect without using SSL, edit your Gemfile sources and change 'https' to 'http'.我要把https改成http吗?安全吗?
发布于 2015-03-21 14:40:58
正如错误消息所述:
有关OpenSSL证书的信息,请参见bit.ly/ruby。
Bit.ly/ruby指向http://railsapps.github.io/openssl-certificate-verify-failed.html,它解释了正在发生的事情,并就如何修复它提出了建议。
在https中将http更改为source 'http://rubygems.org'是推荐的解决方法之一。
底部有一个windows特定的解决方案,建议下载一个用于cacert.pem的RailsInstaller。
发布于 2015-03-21 14:32:05
这可以通过运行gem update --system来解决。
不久之前,我自己也遇到了同样的问题,这为我解决了这个问题。
发布于 2016-12-13 18:04:33
只需转到根目录中的gem文件,并将"https“替换为"http”在最上面的行中。
https://stackoverflow.com/questions/29183830
复制相似问题