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
Thanks all for your help on this. Troubleshooting this killed a lot of my time but being a front-end dev I had no idea WTF I was doing and all your comments gave me some direction.
I came across the same errors as @suranyami did but to get this working with jRuby I reinstalled RVM, Homebrew, and updated my JDK.