BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Warbler: Rails Packaging for Java EE WAR files enhancement

Warbler: Rails Packaging for Java EE WAR files enhancement

This item in japanese

Nick Sieger who is part of JRuby team worked on integrating latest JRuby v1.0.1 and Goldspike 1.3. Goldspike allows you to deploy your Rails application to JEE Servers. It is part of JRuby extras, a group of satellite projects which aim at filling the gap between JRuby and Ruby libraries.   Unsatisfied with the approach Goldspike takes to packaging the application, Nick decided to rewrite the Goldspike packaging plugin, and Warbler was born.

On the problems with GoldSpike:
...in my own opinion it took the wrong approach to packaging Rails in a .war file. It puts the Rails application directory structure into the root of the .war file where any web server or Java application server might mistakenly serve up your code as static content. The Java .war file spec has this special directory called WEB-INF expressly for the purpose of hiding that stuff away, so why not use it?...And then, suddenly Goldspike was packaging up my entire Rails application directory, .svn directories and everything. So I set out to fix this once and for all.
Warbler comes as a gem and bundles the JRuby and the Goldspike servlet for dispatching requests to your application inside a Java application server; it assembles all jar files in WARBLER_HOME/lib/*.jar into your application. Unlike Goldspike it won't download external dependencies.

Warbler's simple command line interface and flexible configuration should make deployment of Rails application to JRuby on a JEE server easier. Warbler was written with 50% less code than the Goldspike packaging plugin.

Rate this Article

Adoption
Style

BT