Porting ruby scripts to JRuby

Hi,

We are using some scripts written in Ruby and want to intergated these
with a Java Tool.
For this, we need to call these Ruby scripts from Java.I came to know
that this can be done using JRuby.
The Ruby scripts have been developed and run from Eclipse IDE.

If so, pls let us know how easy is it to port the Ruby Scripts to JRuby.

Also, is there any other means of calling the Ruby scripts from Java
other than using JRuby?

Thanks in advance,
Ulrich

On Feb 24, 2009, at 11:29 AM, Prakash Maria susai wrote:

Also, is there any other means of calling the Ruby scripts from Java
other than using JRuby?

Thanks in advance,
Ulrich

If they are in pure ruby 1.8 and have no dependency to C-Extensions
(even through gems), chances are very high[1] that they run as
expected.

Otherwise, it’s a question whether those extensions are available
in a Java Version or through FFI (Foreign Function Interface). FFI
is pretty uncommon at the moment, but there is quite a bunch of
gems that implement their extensions both for MRI and JRuby.

Regards,
Florian

[1]: At this point: thanks to the JRuby-Team for the great work.


Florian G.

smtp: [email protected]
jabber: [email protected]
gpg: 533148E2

Florian G. wrote:

On Feb 24, 2009, at 11:29 AM, Prakash Maria susai wrote:

Also, is there any other means of calling the Ruby scripts from Java
other than using JRuby?

Thanks in advance,
Ulrich

If they are in pure ruby 1.8 and have no dependency to C-Extensions
(even through gems), chances are very high[1] that they run as
expected.

Otherwise, it’s a question whether those extensions are available
in a Java Version or through FFI (Foreign Function Interface). FFI
is pretty uncommon at the moment, but there is quite a bunch of
gems that implement their extensions both for MRI and JRuby.

Regards,
Florian

[1]: At this point: thanks to the JRuby-Team for the great work.


Florian G.

smtp: [email protected]
jabber: [email protected]
gpg: 533148E2

Hi,

Thanks for your response.
Also is there any other mechanism of calling Ruby from Java
other than using JRuby?

Thanks in advance,
Ulrich