Rjb::load attempt leads to mongrel abort, uninitialized constant error message

i have been working on integrating the ruby java bridge RJB with a
rails application.

i seem to having trouble getting the rails app to detect the 3rd
party .java class files that i have stored under several layers deep
from the app’s ‘lib’ folder. a rails app controller keeps erroring
with ‘NoClassDefFoundError’.

arton of RJB suggested i include
Rjb::load “#{RAILS_ROOT}/lib”
in the environment.rb file. however, this seems to cause mongrel to
abort, with a ‘`load_missing_constant’: uninitialized constant Rjb
(NameError)’ error message.

(original inquiry at the rjb help forum: http://tinyurl.com/yt6wgb)

i was able to make use of these .java classes from a terminal when my
scripts were standalone, when not yet integrated with the rails

i’ve tried various permutations of specifying the path to the java
classes’ files while in the rails app’s ‘lib’ folder, to no avail.

jvm has been loaded successfully using the ENV[‘CLASSPATH’]=…
mechanism in my ruby script, as far as i can tell. it’s quite
possible that i am mistaken of course.

i’ve re-inquired with arton about my subsequent problem, but i thought
i would post here to see if anyone else can help me as well. please

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