Ruby SSL_connect error

For two days when I try to install new gems I got this error on my console:

Gem::RemoteFetcher::FetchError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://rubygems.org/gems/blankslate-2.1.2.4.gem)

      

This happened after the RubyGems.org DNS update.

I tried gem update --system

it but it didn't help:

ERROR:  While executing gem ... (Gem::RemoteFetcher::FetchError)
SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://rubygems.org/specs.4.8.gz)

      

I am starting Windows user :.

  • Ruby v2.1.5
  • Gem v2.2.2

How can I solve my problem?

+3


source to share


2 answers


One liner fixes it for windows at admin prompt (if you have wget in your path you can apt-cyg install wget

if you have cygwin and apt-cyg)

wget http://curl.haxx.se/ca/cacert.pem -O C:\cacert.pem && setx /M SSL_CERT_FILE "C:\cacert.pem"

      



Or, if you are too lazy to do it in a safe way, just do the following:

gem sources -r https://rubygems.org/
gem sources -a http://rubygems.org/

      

+2


source


Make sure your RVM SSL certificates are up to date:

 rvm osx-ssl-certs status all

      



To update you can run:

rvm osx-ssl-certs update all

      

-1


source







All Articles