Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/59.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails Gem::RemoteFetcher::FetchError:SSL\u connect返回=1 errno=0 state=SSLv3 read_Ruby On Rails_Ruby_Windows - Fatal编程技术网

Ruby on rails Gem::RemoteFetcher::FetchError:SSL\u connect返回=1 errno=0 state=SSLv3 read

Ruby on rails Gem::RemoteFetcher::FetchError:SSL\u connect返回=1 errno=0 state=SSLv3 read,ruby-on-rails,ruby,windows,Ruby On Rails,Ruby,Windows,我正在尝试安装RubyonRails,但在尝试创建应用程序时,我总是会遇到很多错误 以下是我在Windows计算机上所做的操作: 1) 下载的railsinstaller-3.0.0.exe软件 2) 在我的机器上安装了Rails。 3) 已验证安装是否成功: E:\Rails>ruby-vruby 2.0.0p598(2014-11-13)[i386-mingw32] E:\Rails>sqlite3——版本 3.8.7.2 2014-11-18 20:57:56 2AB564B56BF965

我正在尝试安装RubyonRails,但在尝试创建应用程序时,我总是会遇到很多错误

以下是我在Windows计算机上所做的操作:

1) 下载的
railsinstaller-3.0.0.exe
软件 2) 在我的机器上安装了Rails。 3) 已验证安装是否成功:

E:\Rails>ruby-vruby 2.0.0p598(2014-11-13)[i386-mingw32]

E:\Rails>sqlite3——版本 3.8.7.2 2014-11-18 20:57:56 2AB564B56BF9655B7C7B97AB85CAFC8A48329B27F93

E:\Rails>Rails-vdl已弃用,请使用Fiddle Rails 4.1.8

现在,当我尝试创建一个应用程序时,我遇到以下异常:

E:\Rails> cd blog
E:\Rails\blog>rails server
Could not find gem 'tzinfo-data (>= 0) x86-mingw32' in the gems available on this machine.
Run `bundle install` to install missing gems.
E:\Rails\blog>gem install rake -v '10.4.2'
ERROR:  Could not find a valid gem 'rake' (= 10.4.2), 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://rubygems.org/specs.4.8.gz)
使用的命令是:
railsnewblog

         run  bundle install
DL is deprecated, please use Fiddle
Fetching gem metadata from https://rubygems.org/...........
Fetching additional metadata from https://rubygems.org/..
Resolving dependencies...

Gem::RemoteFetcher::FetchError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://rubygems.org/gems/rake-10.4.2.gem)
An error occurred while installing rake (10.4.2), and Bundler cannot continue.
Make sure that `gem install rake -v '10.4.2'` succeeds before bundling.
现在我尝试运行这个命令-
gem install rake-v'10.4.2'
,我现在开始出现以下错误:

E:\Rails>gem install rake -v '10.4.2'
ERROR:  Could not find a valid gem 'rake' (= 10.4.2), 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://rubygems.org/specs.4.8.gz)
我完全被困在这里了,你能告诉我在安装过程中哪里出错了吗?我尝试了书中给出的各种选择,但我总是失败

如果我尝试启动服务器,则会出现以下异常:

E:\Rails> cd blog
E:\Rails\blog>rails server
Could not find gem 'tzinfo-data (>= 0) x86-mingw32' in the gems available on this machine.
Run `bundle install` to install missing gems.
E:\Rails\blog>gem install rake -v '10.4.2'
ERROR:  Could not find a valid gem 'rake' (= 10.4.2), 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://rubygems.org/specs.4.8.gz)
现在,如果我运行
bundle安装
,我将收到新的错误:

E:\Rails\blog>bundle install
DL is deprecated, please use Fiddle
Fetching gem metadata from https://rubygems.org/...........
Fetching additional metadata from https://rubygems.org/..
Resolving dependencies...

Gem::RemoteFetcher::FetchError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://rubygems.org/gems/rake-10.4.2.gem)
An error occurred while installing rake (10.4.2), and Bundler cannot continue.
Make sure that `gem install rake -v '10.4.2'` succeeds before bundling.
同样,如果我尝试安装rake,我会遇到新的异常:

E:\Rails> cd blog
E:\Rails\blog>rails server
Could not find gem 'tzinfo-data (>= 0) x86-mingw32' in the gems available on this machine.
Run `bundle install` to install missing gems.
E:\Rails\blog>gem install rake -v '10.4.2'
ERROR:  Could not find a valid gem 'rake' (= 10.4.2), 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://rubygems.org/specs.4.8.gz)

在过去的两天里,我一直在尝试这一点,但我仍然无法理解我在安装过程中犯了什么错误。

如何在Ruby中添加信任证书

SL\u connect返回的解决方案=1 errno=0 state=SSLv3读取服务器证书B:证书验证失败
如下:


感谢@luislavena solution和@BenY提供答案。

更新您的GEM文件: 从


gem更新--system
将安装最新版本的Rubygems,包括正确的最新信任证书。

这个问题的答案似乎在链接的gist中有很好的记录。非常感谢,它现在起作用了。这个解决方案是一个临时的解决方案,但它是一个不安全的建议,远不是一个永久的解决方案。