title: Can't make https connection with ruby
body: <p>I've tried over 5 different versions of ruby, currently using 1.9.2-p194. I receive this error:</p>
  
  <pre><code>Connection reset by peer - SSL_connect (Errno::ECONNRESET)
  </code></pre>
  
  <p>I've recompiled, I tried rvm, rbenv, and even apt-get ruby...this works:</p>
  
  <pre><code>openssl ssl_client -connect google.com:443
  </code></pre>
  
  <p>Yet this doesn't:</p>
  
  <pre><code>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
  </code></pre>
  
  <p>Does anybody have any ideas how I can better debug this? I'm using Ubuntu 12.04. Locally, where this works, I'm using Ubuntu 10.10. However, openssl ssl_client work on both OS's and so I can only assume it is a ruby issue.</p>
  
  <p>EDIT:</p>
  
  <p>Got it to work using rbenv 1.9.2-p320, yet same ruby version didn't work under rvm. I'd appreciate any insight.</p>