Question

What I mean by this is if I install jRuby on Rails, can I use only the ruby language to build my application? I wanted to install my rails application with jRuby in case I wanted to use Java in the future, though I don't need it now. Or do I not understand? Is jRuby ruby that has access to java libraries?

Was it helpful?

Solution

yes, jruby is ruby (your ruby scripts need no modification to run under jruby). in addition, it has full access to java libraries - check out the wiki for how easy it is to integrate a java class or library into your ruby code.

OTHER TIPS

The others have answered your direct question. I just want to say that I've been using jruby full time at work for the past 6 months and it's great. Deploying a rails app with the glassfish gem is very easy and jruby performs better than MRI ruby 1.8.x.

I've seen no real downside after 6 months other than the fact that we can't use gems that have pieces written in C. However, we've taken a C library and created a gem using FFI and it wasn't too much trouble.

It's also really easy to speed up your app by writing a few key pieces in java (which is easier t work with than C).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top