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

2

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.

Schnauzer answered 29/1, 2012 at 0:25 Comment(3)
Did you add your public key to your github account?Beshrew
Yes - This was all working fine pre ruby 1.9.3 install.Schnauzer
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 problemBegun
O
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

Oriya answered 7/2, 2013 at 8:45 Comment(0)
O
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/

Orlene answered 18/2, 2012 at 5:55 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.