Require not working with nailgun

Hello

I have greatly simplified the invocation of my script by using

require ‘/path/to/jar’

instead of

CLASSPATH=
jruby script.rb

However, running the script in nailgun results in errors:

jruby --ng cimgdiff.rb CY img/photo3l.png img/photo3r.png
img/photo3c.png
jruby --ng cimgdiff.rb CM img/photo5l.png img/photo5r.png
img/photo5c.png
/usr/lib/jruby//lib/ruby/site_ruby/shared/builtin/javasupport/core_ext/object.rb:26:in
include_class': cannot link Java class org.itk.io.itkImageFileReaderIUC2, probable missing dependency: Native Library /usr/lib/jni/libBaseJava.so already loaded in another classloader (NameError) from cimgdiff.rb:33 from cimgdiff.rb:26:ineach’
from cimgdiff.rb:26

jruby 1.5.1 (ruby 1.8.7 patchlevel 249) (2010-07-30 6586) (OpenJDK
64-Bit Server VM 1.6.0_18) [amd64-java]

Any solution to this issue?

Thanks

Michal