I tried more than 5 different versions of ruby, currently using 1.9.2-p194. I get this error:
Connection reset by peer - SSL_connect (Errno::ECONNRESET)
I recompiled, I tried rvm, rbenv and even apt-get ruby ββ... this works:
openssl ssl_client -connect google.com:443
But this is not so:
require "net/https" require "uri" uri = URI.parse("https://google.com/") http = Net::HTTP.new(uri.host, uri.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE http.start do |agent| p agent.get(uri.path).read_body end
Does anyone have any ideas how I can better debug this? I am using Ubuntu 12.04. Locally, where it works, I use Ubuntu 10.10. However, openssl ssl_client works on both OSs, so I can only assume that this is a problem with ruby.
EDIT:
I got it to work using rbenv 1.9.2-p320, but the same ruby ββversion did not work with rvm. I would appreciate understanding.
source share