Skip to content

Instantly share code, notes, and snippets.

@richardsondx
Forked from kendagriff/solution.md
Created March 4, 2016 14:47
Show Gist options
  • Save richardsondx/f6796622afd5ed9c5c43 to your computer and use it in GitHub Desktop.
Save richardsondx/f6796622afd5ed9c5c43 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