首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >当我生成一个新的rails应用程序时,我会得到这个错误

当我生成一个新的rails应用程序时,我会得到这个错误
EN

Ask Ubuntu用户
提问于 2017-02-10 02:50:06
回答 2查看 2.6K关注 0票数 0
代码语言: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 rubygems.
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 ruby gem.
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 rubygems.
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'.
         run  bundle exec spring binstub --all

我运行了gem update --system,但是它不起作用。我又犯了一个错误:

代码语言:javascript
复制
ERROR:  While executing gem ... (Gem::RemoteFetcher::FetchError)
    SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://api.rubygems.org/specs.4.8.gz)

这是怎么回事,我该怎么解决呢?谢谢

EN

回答 2

Ask Ubuntu用户

发布于 2017-02-16 03:18:19

此问题通常发生在旧版本的rubygem中。您可以尝试通过运行

代码语言:javascript
复制
gem update --system --source http://rubygems.org/

在那之后

代码语言:javascript
复制
gem update

来源

票数 1
EN

Ask Ubuntu用户

发布于 2019-05-30 05:51:51

在主目录中创建一个新文件.gemrc并添加这一行。

代码语言:javascript
复制
:ssl_verify_mode: 0

现在,即使无法验证SSL连接是“可信的”,它也应该继续。

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

https://askubuntu.com/questions/881782

复制
相关文章

相似问题

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