Skip to content

Instantly share code, notes, and snippets.

@Domon
Created November 30, 2012 14:02
Show Gist options
  • Save Domon/4175889 to your computer and use it in GitHub Desktop.
Save Domon/4175889 to your computer and use it in GitHub Desktop.
How to fix the error: "SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed"

When seeing the following error:

SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed

First, check your RubyGems version is higher than 1.8.24:

gem update --system

If that doesn't solve the problem, consider reinstalling Ruby with a new version of OpenSSL:

rbenv uninstall 1.9.3-p327

brew install readline
brew install openssl

CONFIGURE_OPTS="--disable-install-doc --with-openssl-dir=`brew --prefix openssl` --with-readline-dir=`brew --prefix readline`" rbenv install 1.9.3-p327

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment