RJB in Rails - setting JAVA_HOME correctly in environment.rb

All,

I am attempting to use RJB (Java-Ruby Bridge - see:
http://arton.no-ip.info/collabo/backyard/?RubyJavaBridge) in my Rails
app.

The documentation says: “Both LD_LIBRARY_PATH and JAVA_HOME setting
required in environment.rb file of RoR.”

However, it doesn’t say how to set these variables in environment.rb.

I’ve tried

JAVA_HOME = ‘path_to_java_home’
ENV[‘JAVA_HOME’] = ‘path_to_java_home’

but I can’t get it to start the VM.

Is there someone out there who has gotten RJB working inside of their
Rails app. that can explain the correct way to set these variables in
environment.rb?

Thanks,
Wes

My bad. I was setting the heap parameters too high - that’s why the JVM
wouldn’t start. JAVA_HOME was already set in my environment anyway - I
didn’t have to do anything in environment.rb.

Wes

Heya Wes –

I’m coming across the same problem. How did you go about setting the
heap parameters?

Thanks for any help!

-Lucas

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