Skip to content

Instantly share code, notes, and snippets.

@kendagriff
Created November 7, 2015 04:57
Show Gist options
  • Star 12 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save kendagriff/adec3713b4dfe6a1abdf to your computer and use it in GitHub Desktop.
Save kendagriff/adec3713b4dfe6a1abdf 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
@palashmandokhot
Copy link

how to solve invalid keystore error??????

@palashmandokhot
Copy link

how to solve invalid keystore error??????

@dennis-d
Copy link

nuking jdk seems to help

@itsjms
Copy link

itsjms commented Mar 6, 2018

❤️ https://gist.github.com/kendagriff/adec3713b4dfe6a1abdf#gistcomment-1933072 this is EXACTLY how to fix. I have been dealing with this issue for months and setting that cert file every time.

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