I got the following error:
OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed from C:/Ruby1.9.2/lib/ruby/1.9.1/net/http.rb:678:in `connect'
after reading this , I found that the fix is ββto download the cacert.pem file from. The message recommends doing something like this:
ENV['SSL_CERT_FILE'] = File.join(File.dirname(__FILE__),"cacert.pem")
And, indeed, this solves the problem. However, who reads the SSL_CERT_FILE
value? Changing the environment is not like the ruby ββpath. I am looking for a solution that can work with both Rails and Sinatra.
source share