Forum: Ruby on Rails help - how to call java classes from controller

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Rm R. (Guest)
on 2007-02-19 19:11
hi,

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.
Robert W. (Guest)
on 2007-02-19 19:38
(Received via mailing list)
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.
Charles Oliver N. (Guest)
on 2007-02-20 11:09
(Received via mailing list)
On Feb 19, 11:11 am, Rm Rm <removed_email_address@domain.invalid> 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 :)

- Charlie
This topic is locked and can not be replied to.