0
votes

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.

2
Did you add your public key to your github account? - sosborn
Yes - This was all working fine pre ruby 1.9.3 install. - Bob Walsh
Which version of OpenSSL do you have? Looks like Ruby 1.9.2 works with OpenSSL 1.0.0 & 1.0.1, But Ruby 1.9.3 has a problem with 1.0.1. bugs.launchpad.net/ubuntu/+source/openssl/+bug/965371 - seems to be a description of the problem - PrasannaK

2 Answers

2
votes

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

0
votes

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/