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

**URL:** <https://www.ruby-forum.com/t/rjb-load-attempt-leads-to-mongrel-abort-uninitialized-constant-error-message/133598>\
**Category:** Rails\
**Created:** [April 1, 2008, 11:55pm UTC](https://www.ruby-forum.com/t/rjb-load-attempt-leads-to-mongrel-abort-uninitialized-constant-error-message/133598 "2008-04-01T23:55:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![scootiepuff](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e9bcb4/32.png) [@scootiepuff](https://www.ruby-forum.com/u/scootiepuff)\
**Post date:** [April 1, 2008, 11:55pm UTC](https://www.ruby-forum.com/t/rjb-load-attempt-leads-to-mongrel-abort-uninitialized-constant-error-message/133598/1 "2008-04-01T23:55:33Z")

</div>

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](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  
application.

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  
advise?
