红宝石在轨道上 - "Unable to download data from https://rubygems.org/"因为"certificate verify failed"



我按照Rails教程的指示将这段代码添加到我的mydbs_controller.rb:

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

我运行我的数据库,出现这个错误:

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.

所以我添加了gem 'responders', '~> 2.0'到我的gemfile,并尝试捆绑安装。

我遇到另一个错误告诉我

确保gem install responders -v '2.1.0'在绑定前成功。

运行后,我留下了另一个错误

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)

我遇到过同样的问题。然后我改变宝石来源" https://rubygems.org/", " http://rubygems.org/"

所以我的问题是,我需要在ruby 2.2.2版本上运行。然而,这个更新(仅适用于windows用户)带来了很多错误,我发现这些错误在mac上不会出现。

最新更新