[rjb-users] Strange error when including another library

rjb-users at rubyforge.org rjb-users at rubyforge.org
Wed Nov 1 10:00:16 EST 2006

Hello Again,

I'm using RJB with a C++ toolkit called Open Babel
It uses a SWIG wrapper.

When using Open Babel and RJB together I get a strange
error message. This series of commands produces the

require 'rubygems'
require_gem 'rjb'
require 'rjb'
require 'openbabel'

nts = Rjb::import

This is the error that is produced (using irb):

InternalError: unknown exception
        from (irb):6:in `import'
        from (irb):6

However, when I use this sequence of commands, I get
no errors and can go on to use both libraries:

require 'rubygems'
require_gem 'rjb'
require 'rjb'

nts = Rjb::import

require 'openbabel'

If I'm using Rjb::import to import Java library
classes (java.util.Vector), then I don't get errors
regardless of the order of commands. I've checked
CLASSPATH, and it appears unmodified by require
'openbabel'. Also, require 'net/http' in place of
require 'openbabel' does not produce an error
regardless of the order of commands.

Any ideas?


Richard Apodaca
Blog: http://depth-first.com

Check out the New Yahoo! Mail - Fire up a more powerful email and get things done faster. 

More information about the rjb-users mailing list