Openssl error with latest JDK and JRuby

LoadError: load error: openssl – java.lang.NoClassDefFoundError:
Could not initialize class org.jruby.ext.openssl.ASN1
org/jruby/RubyKernel.java:1054:in require' /usr/local/Cellar/jruby/1.7.4/libexec/lib/ruby/shared/rubygems/custom_require.rb:36:inrequire’
/usr/local/Cellar/jruby/1.7.4/libexec/lib/ruby/1.9/net/https.rb:22:in
(root)' org/jruby/RubyKernel.java:1054:inrequire’

$ java -version
java version “1.7.0_25”
Java™ SE Runtime Environment (build 1.7.0_25-b15)
Java HotSpot™ 64-Bit Server VM (build 23.25-b01, mixed mode)

$ jruby -v
jruby 1.7.4 (1.9.3p392) 2013-05-16 2390d3b on Java HotSpot™ 64-Bit
Server VM 1.7.0_25-b15 [darwin-x86_64]

Is this a known issue? I can share a repro script that works 100% on
OS X if that’d help.

I think I’ve seen this before, you may need to remove the old jruby ssl
gems from your Gemfile when upgrading to 1.7.4

Either that or it was a conflict with a jar I had loaded.

Correct…make sure you do not have any old jruby-openssl or
bouncycastle-* gems installed.

  • Charlie