Skip to content

Instantly share code, notes, and snippets.

@cmthakur
Forked from kendagriff/solution.md
Created September 12, 2017 08:13
Show Gist options
  • Save cmthakur/fd42fbce5b0f628a5ede8ef7656dc1d0 to your computer and use it in GitHub Desktop.
Save cmthakur/fd42fbce5b0f628a5ede8ef7656dc1d0 to your computer and use it in GitHub Desktop.
Solution to "OpenSSL::X509::StoreError: setting default path failed: Invalid keystore format" for JRuby

Solution to StoreError: invalid keystore format (OS X)

The following error appeared upon upgrading JRuby:

OpenSSL::X509::StoreError: setting default path failed: Invalid keystore format

Download cacert.pem

wget http://curl.haxx.se/ca/cacert.pem

Create a keystore from the file

sudo keytool -importcert -file cacert.pem -keystore /Users/youruser/.keystore

Set SSL_CERT_FILE

export SSL_CERT_FILE=/Users/youruser/.keystore

Install gems

jruby -S gem install whatever
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment