Ashish Sahni has posted instructions for packaging a Rails app as a WAR on his blog, based on the work of a number of JRuby community members. I ran through his instructions, and have only two modifications to make:
- When installing Rails, you still probably want to pass --no-ri --no-rdoc since rdoc generation is still far too slow.
- Because JRuby has a classloading bug (not loading from context classloader) you'll need to put the rails-integration JAR in glassfish/lib.
So then, there's two important points you should get out of this:
Rails in a WAR file will happen...soon
This has always been our goal, with every improvement and fix we made to JRuby. The holy grail of Rails deployment would be to "zip it up and deploy it" like Java app developers can do with WAR files. And that goal is just around the corner, thanks to the JRuby community. That leads me to the second point:
The JRuby community is growing fast and doing great things
This is especially exciting to me. Tom and I are only two folks, even with full-time license to work on JRuby and related projects. The only way Ruby can be successful on the JVM is with community cooperation, and the work toward WAR deployment exemplifies what can happen.
I'd like to thank the folks on the JRuby-Extras project who have been working on this: Robert Egglestone, Chris Nelson, Fausto Lelli, and also Ashish Sahni at Sun who put together a great walkthrough.
Excellent work.
1 comment:
Thank you for sharing the latest news. We are building a financial application in Rails and hope to be in a position to deploy it to bank in 4-6 months time.
Do you think this JRuby thing will be ready by that time (both in terms of 1.0 label as well as comparable performance to at least MRI)? In anticipation of your reply, yes my team will soon start testing the stuff in JRuby and contribute fixes/bugs/etc as and when we find something. We already do contribute stuff to various projects.
Also, haven't heard any news from you on JRuby performance lately. Are we likely to to get a MRI equivalent performance in in JRuby any time soon for a web application deployment?
As a side question, naturally web applications having deep stacks (a stack trace of a Rails error will show some 40 methods deep), are we to expect that web application performance to be in the range of your recursive benchmarks or iterative ones for JRuby?
Thank you for making it possible to dream about having the cake and eat it too (Dev in Rails productivity and deploy in J2EE stability and established tooling) soon.
Post a Comment