Help - how to call java classes from controller


I need help to call java classes from the a controller action. I can
call a java class from a ruby script, but when I am trying to call in
controller, then

require ‘java’

itself gives me load error.

I have java 1.4, jruby 0.9.0 and ruby 1.8.5 installed.

I have tried to start server as :

jruby script/server but it does not work.

In my application I need to use 3rd party java apis. How can I call
external ruby script from controller action if that can work ?

Any help is greatly appreciated.

Sounds to me like it would be best to find a good JRuby forum to post
your question. Sorry I have no experience with JRuby as is likely the
case with most members of this forum.

On Feb 19, 11:11 am, Rm Rm [email protected] wrote:

I have java 1.4,jruby0.9.0 and ruby 1.8.5 installed.
Goodness. You need a much newer JRuby. JRuby 0.9.2 is the most recent
official release, and really most folks are running off trunk. At the
very least you should use 0.9.2. I’d also recommend you join the JRuby
lists to ask more questions…we’re very friendly :slight_smile:

  • Charlie