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
Sorry, I spoke too soon. The solution @dpaloa2 suggested did work for both jRuby and MRI, but then when I tried to install something with
homebrew
I get the same sort of X509 error.If I unset the
SSL_CERT_FILE
variable,homebrew
and MRI work, but jRuby doesn't. Very frustrating.I'm going to try a full
rvm implode
and see if that changes the situation.