首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >从命令提示符运行rails应用程序时出错

从命令提示符运行rails应用程序时出错
EN

Stack Overflow用户
提问于 2015-03-21 14:29:26
回答 6查看 8.7K关注 0票数 2

我有rails 4.1.8的红宝石版本“ruby2.1.5p273 (2014-11-13修订版48405) i 386-mingw32”在windows 8中。我遵循本教程安装rails“http://installfest.railsbridge.org/installfest/windows”。不管我什么时候运行rails应用程序,我都会收到这个错误-

代码语言:javascript
复制
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吗?安全吗?

EN

回答 6

Stack Overflow用户

回答已采纳

发布于 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

票数 4
EN

Stack Overflow用户

发布于 2015-03-21 14:32:05

这可以通过运行gem update --system来解决。

不久之前,我自己也遇到了同样的问题,这为我解决了这个问题。

票数 2
EN

Stack Overflow用户

发布于 2016-12-13 18:04:33

只需转到根目录中的gem文件,并将"https“替换为"http”在最上面的行中。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/29183830

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档