“证书验证失败”在Windows上安装Ruby gems时出错 [英] "certificate verify failed" error when installing Ruby gems on Windows

查看:404
本文介绍了“证书验证失败”在Windows上安装Ruby gems时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



安装gem时出现错误:

  C:\> gem install bundle 
错误:无法找到有效的gem'bundle'(> = 0),原因如下:
无法从https://rubygems.org/下载数据 - SSL_connect retur
ned = 1 errno = 0 state = SSLv3读取服务器证书B:证书验证失败(
https://api.rubygems.org/latest_specs.4.8.gz)


我希望有一个很好的解决方案。 解决方案

我也有这个问题。但是使用旧版本并不是正确的解决方案。



以下是解决此证书错误的两种解决方案帮助:

1。使用http而不是https将允许您在没有该错误的情况下安装gem
$ b blockquote>

gem install bundler -r --source http://rubygems.org/


2。根据以下链接提供的解决方案更新证书
$ b


https://gist.github.com/luislavena/f064211759ee0f806c88



I am using a Windows PC running 8.1 and working with Ruby Installer 2.1.5.

While installing a gem I am getting a error:

C:\> gem install bundle
ERROR:  Could not find a valid gem 'bundle' (>= 0), here is why:
          Unable to download data from https://rubygems.org/ - SSL_connect retur
ned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (
https://api.rubygems.org/latest_specs.4.8.gz)

I hope there is a good solution.

解决方案

I had this problem too. But using the older version is not the proper solution.

Here is the two solution help to fix this certificate error

1. Using the http instead of https will allow you to install the gem without that error

gem install bundler -r --source http://rubygems.org/

2. Update the certificate based on the solution provided in the below link

https://gist.github.com/luislavena/f064211759ee0f806c88

这篇关于“证书验证失败”在Windows上安装Ruby gems时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆