The following error appeared upon upgrading JRuby:
OpenSSL::X509::StoreError: setting default path failed: Invalid keystore format
wget http://curl.haxx.se/ca/cacert.pem
sudo keytool -importcert -file cacert.pem -keystore /Users/youruser/.keystore
export SSL_CERT_FILE=/Users/youruser/.keystore
jruby -S gem install whatever
+1 to everyone who posted all your helpful comments.
I've been dealing with this for months, commenting and uncommenting
export SSL_CERT_FILE=...
until I finally got fed up.I tried pretty much everything listed here.
The steps that finally resolved everything for me.
brew install openssl
/usr/local/bin/ -> {the location of the latest homebrew version}
rvm implode
Finally everything is working, no SSL_CERT_FILE, no random keystore files, no failures
ALSO: I would avoid
rvm osx-ssl-certs update all
this breaks my jdk cert everytime.