I am trying to embed JRuby
in a Java project. I am using jruby-complete-1.7.4.jar
and ScriptingContainer
.
For some reason, the following script throws error.
ScriptingContainer container = new ScriptingContainer();
container.runScriptlet("require 'net/https'");
This fails with the exception
load error: openssl -- java.lang.NoClassDefFoundError: Could not initialize class org.jruby.ext.openssl.ASN1.
This happens only in few computers. I don't have jruby-openssl
and bouncy castle gem installed. My class path contains only jruby-complete-1.7.4.jar
. I am wondering why this error happens and what should be done to work around this problem? How can this work on
a computer and fails on a different one? Any help to debug the issue would be great.
Jruby version - 1.7.4
System - Mac OS X 10.8.4
You do not need jruby-openssl separately .. it should be bundled with jruby jar.. make sure you do not have any old jruby-openssl or bouncycastle installed.