0

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.

Community
  • 1
  • 1
Bob Walsh
  • 13,011
  • 4
  • 24
  • 21
  • Did you add your public key to your github account? – sosborn Jan 29 '12 at 00:32
  • Yes - This was all working fine pre ruby 1.9.3 install. – Bob Walsh Jan 30 '12 at 00:19
  • 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. https://bugs.launchpad.net/ubuntu/+source/openssl/+bug/965371 - seems to be a description of the problem – PrasannaK Apr 27 '12 at 12:20

2 Answers2

4

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

vdaubry
  • 11,369
  • 7
  • 54
  • 76
0

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/

AnkitG
  • 6,438
  • 7
  • 44
  • 72