Forum: Ruby on Rails RJB jave bridge help!

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
8889b05b9f25f84e2e6f8e66b5441155?d=identicon&s=25 stewbawka (Guest)
on 2007-05-01 16:37
(Received via mailing list)
Why is this happening?
if i put my Rjb::load method in environment.rb webrick won't start
from inside radrails it just sits there trying to connect.. however i
can start webrick manually by doing script/server in a terminal

i saw some code where instead of having the load method in
environment.rb they put it in the model that uses it.. decided to try
this, but when i put it in there either inside a 'connect' class
method or just floating inside the body of the class i get the error
'can't create Java VM'..

where does the Rjb::load method go? i left the require in
environment.rb (but i did try moving it out of desperation trying to
get things to work)..

any help would be majorly appreciated
21f7ed21f11a809050594c82eab11d67?d=identicon&s=25 Robert Walker (Guest)
on 2007-05-01 17:47
(Received via mailing list)
I would suggest take this to a JRuby forum.  I would guess most people
here are not running Ruby inside the JVM.  I could be wrong.  I just
imagine you'll get better help from the JRuby guys.
B5259d7e4a3095ef961469d132880b94?d=identicon&s=25 Stephen Gerstacker (Guest)
on 2007-05-01 18:43
(Received via mailing list)
I ran into a similar problem in Windows.  It doesn't detect the
environment variable.  I added the following above the Rjb::load line:

  ENV['JAVA_HOME'] = 'C:\Program Files\Java\jdk1.6.0' if

- Stephen
8889b05b9f25f84e2e6f8e66b5441155?d=identicon&s=25 stewbawka (Guest)
on 2007-05-01 19:14
(Received via mailing list)
Ahhhh! yes the JAVA_HOME wasn't getting passed on! thank you so much..
i'm not on windows, but the ENV['JAVA_HOME'] check failed so i did
like you suggested (but with linux path). funny thing is that it would
work fine when i did script/server in the terminal, but trying to
start the server in radrails kept giving me the 'can't start Java

thanks a bunch..

On May 1, 1:42 pm, "Stephen Gerstacker"
This topic is locked and can not be replied to.