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
I'd like to add a few of points to make the procedure 100% clear:
-- Enter keystore password: then type "changeit"
-- Re-enter new password: and retype "changeit"
-- export SSL_CERT_FILE=/Users/youruser/.keystore
And to add to @madebysquares comment - I broke my install by running 'rvm osx-ssl-certs update all' too. RVM should not allow this to run on jruby until it does not break all jrubies.