安装 ruby​​ 1.9.3 rails 3.2.1 后,获取 OpenSSL::SSL::SSLError: on simple requests [英] After installing ruby 1.9.3 rails 3.2.1, getting OpenSSL::SSL::SSLError: on simple requests

查看:60
本文介绍了安装 ruby​​ 1.9.3 rails 3.2.1 后,获取 OpenSSL::SSL::SSLError: on simple requests的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通过 rvm 安装了 ruby​​ 1.9.3/rails 2.3.1(在通过 rvm pkg 安装 openssl 后终于工作了.)但现在尝试连接到 github(可能还有其他任何东西)时出现 OpenSSL::SSL:SSLError>

-->irb1.9.3-p0 :001 > 需要'open-uri'1.9.3-p0 :002 > open('https://github.com/')OpenSSL::SSL::SSLError: SSL_connect Returned=1 errno=0 state=SSLv3 读取服务器证书 B: 证书验证失败

-- 尝试了 " 中的解决方案;证书验证失败"使用 Ruby 1.9.3 时出现 OpenSSL 错误,但这不起作用.

不确定问题是否出在 OpenSSL 中,但这似乎是问题所在.

解决方案

这里有很多可能适合您的解决方案:

http://railsapps.github.com/openssl-certificate-verify-失败.html

如果它在这里仍然不起作用,是什么为我解决了这个问题:

rvm pkg install opensslrvm 安装 1.9.3-p374 –with-openssl-dir=$rvm_path/usrcd $rvm_path/usr/sslcurl -O http://curl.haxx.se/ca/cacert.pemmv cacert.pem cert.pem

文森特,希望这会有所帮助

Got ruby 1.9.3/rails 2.3.1 installed via rvm (finally worked after installing openssl via rvm pkg.) but now getting OpenSSL::SSL:SSLError trying to connect to github (and probably anything else):

-->irb 1.9.3-p0 :001 > require 'open-uri' 1.9.3-p0 :002 > open('https://github.com/') OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed

-- Tried the solution in "Certificate verify failed" OpenSSL error when using Ruby 1.9.3 but that did not work.

Not sure if the problem is in OpenSSL, but that seems to be the issue.

解决方案

There is a bunch of solutions that might work for you here :

http://railsapps.github.com/openssl-certificate-verify-failed.html

If it still doesn't work here what solved it for me :

rvm pkg install openssl
rvm install 1.9.3-p374 –with-openssl-dir=$rvm_path/usr
cd $rvm_path/usr/ssl
curl -O http://curl.haxx.se/ca/cacert.pem
mv cacert.pem cert.pem

Hope this helps, Vincent

这篇关于安装 ruby​​ 1.9.3 rails 3.2.1 后,获取 OpenSSL::SSL::SSLError: on simple requests的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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