DevOps Monkey Goodness

Windows Ruby SSL Error Certificate Verify Failed

On my Windows 7 setup I have Ruby 2.1.6 installed but when I started to try and retrieve things from any HTTPS address I received the following error:

C:/tools/ruby21/lib/ruby/2.1.0/net/http.rb:923:in `connect': SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (Faraday::SSLError)from C:/tools/ruby21/lib/ruby/2.1.0/net/http.rb:923:in `block in connect' from C:/tools/ruby21/lib/ruby/2.1.0/timeout.rb:76:in `timeout'

The Fix

  1. Download cacert.pem from and save to a local folder
  2. Add a new environment variable SSL_CERT_FILE with value to your downloaded cert i.e. c:\certs\cacert.pem
  3. Restart your shell if you were already running commands to load up the new environment variables

No Comments Yet

Leave a Reply