[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
(http://depth-first.com/articles/2006/10/31/obruby-a-ruby-interface-to-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
error:

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

nts = Rjb::import
'uk.ac.cam.ch.wwmm.opsin.NameToStructure'

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
'uk.ac.cam.ch.wwmm.opsin.NameToStructure'

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?

thanks,
Rich


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


 
__________________________________________________________________________________________
Check out the New Yahoo! Mail - Fire up a more powerful email and get things done faster. 
(http://advision.webevents.yahoo.com/mailbeta) 



More information about the rjb-users mailing list