Skip to content

Instantly share code, notes, and snippets.

@benhoskings
Last active March 21, 2016 18:30
Show Gist options
  • Save benhoskings/5027023 to your computer and use it in GitHub Desktop.
Save benhoskings/5027023 to your computer and use it in GitHub Desktop.
Ruby 2.0 CA cert issue fix
# If you're having cert issues on ruby 2.0.0-p0, the issue is most likely that ruby can't
# find the required intermediate certificates. If you built it via rbenv/ruby-build, then
# the certs are already on your system, just not where ruby expects them to be.
# When ruby-build installs openssl, it installs the CA certs here:
~/.rbenv/versions/2.0.0-p0/openssl/ssl/cacert.pem
# Ruby is expecting them here:
$(ruby -ropenssl -e 'puts OpenSSL::X509::DEFAULT_CERT_FILE')
# Which for me, is this path:
~/.rbenv/versions/2.0.0-p0/openssl/ssl/cert.pem
# So to fix the problem, all I had to do was this:
(cd ~/.rbenv/versions/2.0.0-p0/openssl/ssl && ln -s cacert.pem cert.pem)
# Woohoo!
@mlafeldt
Copy link

@benhoskings Very helpful. Thanks!

@agrimm
Copy link

agrimm commented Feb 25, 2013

👍

@ecoologic
Copy link

👍 easy thanks to you

@johnugeorge
Copy link

is this configuration to be done on the ssl client or server?

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