After installing ruby 1.9.3 rails 3.2.1, getting OpenSSL::SSL::SSLError: on simple requests

情到浓时终转凉″ 提交于 2020-01-03 05:46:33

问题


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.


回答1:


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




回答2:


Ruby 1.9.3-p125 is released.

This release include a security fixes of the Ruby OpenSSL extension. And many bugs are fixed in this release.

http://www.ruby-lang.org/en/news/2012/02/16/ruby-1-9-3-p125-is-released/



来源:https://stackoverflow.com/questions/9049857/after-installing-ruby-1-9-3-rails-3-2-1-getting-opensslsslsslerror-on-simp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!