当前位置: 首页 > 知识库问答 >
问题:

Gem::RemteFetcher::FetchError-包安装期间证书验证失败[重复]

解博明
2023-03-14

可能重复:
捆绑包安装失败,SSL证书验证错误

我在安装捆绑包时遇到问题。他没有工作
文件

source 'https://rubygems.org'

gem 'rails', '3.2.8'

gem 'sqlite3'

group :assets do
  gem 'sass-rails',   '~> 3.2.3'
  gem 'coffee-rails', '~> 3.2.1'

  gem 'uglifier', '>= 1.0.3'
end

gem "jquery-rails", "~> 2.1.3"

当我执行命令bundle install时,我收到:

D:\ruby\work\myPage>bundle install
Fetching gem metadata from https://rubygems.org/.........
Using rake (0.9.2.2)
Using i18n (0.6.1)
Using multi_json (1.3.6)
Using activesupport (3.2.8)
Using builder (3.0.3)
Using activemodel (3.2.8)
Using erubis (2.7.0)
Using journey (1.0.4)
Using rack (1.4.1)
Using rack-cache (1.2)
Using rack-test (0.6.2)
Using hike (1.2.1)
Using tilt (1.3.3)
Using sprockets (2.1.3)
Using actionpack (3.2.8)
Using mime-types (1.19)
Using polyglot (0.3.3)
Using treetop (1.4.11)
Using mail (2.4.4)
Using actionmailer (3.2.8)
Using arel (3.0.2)
Using tzinfo (0.3.33)
Using activerecord (3.2.8)
Using activeresource (3.2.8)
Using bundler (1.2.1)
Using coffee-script-source (1.3.3)
Using execjs (1.4.0)
Using coffee-script (2.2.0)
Using rack-ssl (1.3.2)

Gem::RemoteFetcher::FetchError: SSL_connect returned=1 errno=0 state=SSLv3 read
server certificate B: certificate verify failed (https://rubygems.org/gems/json-1.7.5.gem)
An error occurred while installing json (1.7.5), and Bundler cannot continue.
Make sure that `gem install json -v '1.7.5'` succeeds before bundling.

然后我尝试启动服务器rails服务器

D:\ruby\work\myPage>rails server
←[31mCould not find gem 'sqlite3 (>= 0) x86-mingw32' in the gems available on this machine.←[0m
←[33mRun `bundle install` to install missing gems.←[0m

会有什么问题?以及如何解决?


共有3个答案

郝君博
2023-03-14

此错误的解释可在此处找到

http://railsapps.github.com/openssl-certificate-verify-failed.html

检查您的ruby版本和rubygems版本

然后使用gem update--system修复它

龙晟睿
2023-03-14

我解决了这个问题。我完全去掉了红宝石。然后重新安装它。

宗波涛
2023-03-14

这是因为您的rubygems版本中有一个bug。

你可以选择跑步

gem update --system

或者,从GEM文件中的源中删除,如下所示:

source 'http://rubygems.org'
 类似资料:
  • 安装NoDJS、Ruby和Git + Buver后,尝试安装基础。 我一直收到以下错误,我不知道如何修复它: 找不到有效的宝石'基础'( 有什么想法吗?

  • 我在Windows上设置了Rails项目和数据库,一些宝石丢失了。当试图安装他们我得到以下错误: 我试过了 https://gist.github.com/luislavena/f064211759ee0f806c88 和 SSL错误安装rubygem时,无法从https://rubygems.org/ 但这些都没有奏效。有什么想法吗?

  • 我不能通过pip安装安装任何外部python模块。我已经正确安装了python,但如果我使用pip_install它显示我这个错误。 下面是我运行

  • 问题内容: 我正在尝试使用pip为Python安装Scrapy软件包(以及其他)。我曾尝试做使用python 3和python 2安装,我已经安装/升级,像这样的setuptools:我曾尝试使用选项像这样:。但是当我运行时,我总是收到相同的错误消息。完整的输出是这样的: 我在Mac OS版本10.12.1上,并且正在使用python 3.6。有人知道这个问题的解决方案吗? 问题答案: 如此处所述

  • 问题内容: 尝试运行Discord机器人时,遇到此错误: 它刚刚开始无处不在,并且每次都在发生。 我在Windows 10上使用python 3.8 这是什么意思,我该如何解决? 问题答案: 要解决此问题: 使用Internet Explorer转到discord.com(以管理员身份运行) 点击右上角的锁 点击查看证书 安装一个 PS:如果您的防病毒软件对Web浏览器有效,并且此解决方案不起作用