[英]“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.