I just watched this JRuby
presented by Charles Nutter
the JRuby guys hired by Sun
found it to be a great update on JRuby, how far it's come, and a few of the many uses you
can find for it in your new or existing development projects. So many changes are
happening so quickly in the JRuby world this video, dated April 18th 2008, gives a nice
up-to-date summary of what's going on straight from one of the top authorities. It's a
bit long at 53 minutes, but most of the beginning is an intro to Ruby which you could
probably put in the background while you do something else.
I found the following points noteworthy:
- JRuby 1.1.x is out
- JRuby continues to significantly outperform CRuby. At least in certain benchmarks.
This hasn't quite been my experience comparing the same Rails app deployed in Glassfish
vs. running through Mongrel, but... I should probably check again, ensuring system
resources aren't to blame.
- Ruby code is now fully byte compiled either just-in-time, or you can pre-compile your
ruby scripts into Java .class files ahead of time (using jrubyc)!
is an easy way to make .war files out of your Rails app, for deployment into any Java web
app container. As Charles says, hand them to your ops team, and no one might ever know
your code was written in Ruby!
- A handy gem called glassfish_rails is
out that makes firing up glassfish using your Rails app a snap. I believe this is only
for Glassfish v3, which is a technology preview release. One thing I want to see on this
is if you can make changes to your Ruby code and have this reflected immediately (without
restarting Glassfish). I really hope so.
I'm still trying to find that perfect opportunity to deploy a Rails app via Glassfish and
JRuby. So far my Rails apps have been smallish internal apps at my day job and, despite
my employer primarily being a Java shop, there hasn't been any real need for this kind of
integration (that is, Java and Ruby code running in the same JVM), nor have I really
needed use of a particular Java library that badly, so plain ol' CRuby and Mongrel has
done the job just fine. Articles like JRuby
- Or how I manage to write Ruby in a strict corporate environment
really crack me up
though. One of these days, it will happen.