Issue with JRuby Embed, require_relative, Netbeans Jellytools, and Windows


** Context:

We’re developing a Netbeans 7.2 RCP Java 1.6 application, on MacOS
10.7.3 with JRuby Embed (the ScriptingContainer class) via
“jruby-complete-1.7.0.preview2.jar” as a Wrapped Jar. We deploy the
application to Windows and Macs. We have some JUnit unit tests, and
some Jellytools integration tests.

** Problem:

We are running a scriptlet with JRuby Embed’s
with the following:

ScriptingContainer container = new ScriptingContainer();
StringWriter outWriter = new StringWriter();
StringWriter errorWriter = new StringWriter();
container.runScriptlet("require 'write_dicom.rb'");

The script “write_dicom.rb” is a file within one of the modules of our

When we run this as part of a unit test (on Mac or Windows) all is fine.
When its run as part of the installed application itself (on Mac or
Windows) its also fine. When its run as part of a Jellytools
integration test on Mac its fine.

But – when we run it as part of a Jellytools integration test on
Windows we get a LoadError:

LoadError: load error: write_dicom –
java.lang.IllegalArgumentException: URI is not hierarchical
require at org/jruby/
require at
(root) at :1

We are not getting a “LoadError: no such file to load”, so we’ve
concluded that the script has been found okay in the load path. And
we’ve turned on loader debugging using

Properties p = System.getProperties();
p.setProperty(“jruby.debug.loadService”, “true”);

and confirmed that JRuby has indeed found the script inside the Module’s

** Questions:

What could be going on here? Could it be something specifically related
to the ClassLoader that is used by Jellytools on Windows? And, should I
log this as a bug?

many thanks in advance,



This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs