This is nearly a duplicate of:
SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
but specific to a Rails 4 and Ruby 2 environment. I figure it is appropriate to make a new question because the solutions that worked on my machine for previous environments no longer appear to work after the updates to Rails and Ruby.
The Problem
When making a Net/HTTP SSL request to the tune of:
api_uri = URI("http://accounts.google.com/o/oauth2/token")
https = Net::HTTP.new(api_uri.host, api_uri.port)
https.use_ssl = true
https.ca_file = '/usr/local/etc/openssl/cert.pem' if Rails.env == "development"
https.request_get(api_uri.path)
I receive the
OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: unknown protocol
error. I've tried out the solutions in the referenced question that worked in the previous environments, to no avail.