简体   繁体   English

“无法从https://rubygems.org/下载数据”,因为“证书验证失败”

[英]“Unable to download data from https://rubygems.org/” because “certificate verify failed”

I added this code to my mydbs_controller.rb as instructed on the Rails tutorial: 我按照Rails教程中的说明将此代码添加到mydbs_controller.rb中:

def create
  @mydbs = Mydb.new(params[:mydb])

  @mydb.save
  redirect_to @mydb
end

I run my database and come up with this error: 我运行我的数据库并提出以下错误:

 The controller-level `respond_to' feature has been extracted to the `responders` gem. Add it to your Gemfile to continue using this feature: gem 'responders', '~> 2.0' Consult the Rails upgrade guide for details. 

So I added gem 'responders', '~> 2.0' to my gemfile and tried a bundle install. 所以我在gemfile中添加了gem'responders','〜> 2.0'并尝试了捆绑安装。

I run into another error telling me 我遇到另一个错误告诉我

Make sure that gem install responders -v '2.1.0' succeeds before bundling. 捆绑之前,请确保gem install responders -v '2.1.0'成功。

After running that I'm left with yet another error 运行后,我仍然遇到另一个错误

ERROR: Could not find a valid gem 'responders' (= 2.1.0), here is why: Unable to download data from https://rubygems.org/ - SSL_connect returned=1 errno=0 state =SSLv3 read server certificate B: certificate verify failed (https://api.rubygems.org/specs.4.8.gz)

I meet same question. 我遇到同样的问题。 Then I change the gem source from " https://rubygems.org/ " to " http://rubygems.org/ " 然后,将gem来源从“ https://rubygems.org/ ”更改为“ http://rubygems.org/

So my problem was that i needed to be running on ruby version 2.2.2. 所以我的问题是我需要在2.2.2版本的ruby上运行。 However that update (only for windows users) pulled a lot of errors that I found to not appear on the mac. 但是,该更新(仅适用于Windows用户)拉出了许多我发现在Mac上没有出现的错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法从http://rubygems.org/下载数据 - Unable to download data from http://rubygems.org/ 无法验证 https://rubygems.org/ 的 SSL 证书 - Could not verify the SSL certificate for https://rubygems.org/ 使用http://rubygems.org而不是https时,“证书验证失败” - “Certificate verify failed” while using http://rubygems.org instead of https SSL 安装 rubygems 时出错,无法从“https://rubygems.org/”提取数据 - SSL Error When installing rubygems, Unable to pull data from 'https://rubygems.org/ Windows 7 64位:找不到有效的宝石'指南针'(> = 0),原因如下:无法从https://rubygems.org/下载数据 - Windows 7 64-bit: Could not find a valid gem 'compass' (>= 0), here is why: Unable to download data from https://rubygems.org/ 即使在Ubuntu 14.04上的gem更新系统之后也无法从https://rubygems.org/获取数据 - Unable to get data from https://rubygems.org/ even after gem update system on ubuntu 14.04 https://rubygems.org/不是URI - https://rubygems.org/ is not a URI 捆绑安装无法从 https://rubygems.org/ 获取规范 - Bundle Install could not fetch specs from https://rubygems.org/ gem mongoid:无法从https://rubygems.org/获取规格 - gem mongoid : Could not fetch specs from https://rubygems.org/ 无法从https://rubygems.org/获取规范 - Could not fetch specs from https://rubygems.org/
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM