I created a standalone (self-contained with all the libraries, gems & plug-ins) and shared (contains only
web.xml and libraries are loaded from the Application Server instance) WAR image for the bundled Hello World sample. The screencast #web9 provide detail instructions on how to create standalone and shared images. The difference in the image size is pretty significant:
|Shared Image||226, 977 bytes|
|Standalone Image||11,039,883 bytes (48 x)|
If you have multiple such applications and each application has one or more plug-ins then this size grows up pretty fast. The
war:shared:create rake target in Goldspike is buggy and serves the same purpose as
Loading shared libraries from GlassFish Application Server instance to keep your Rails application size to a minimum is another reason to consider using GlassFish for deploying your JRuby-on-Rails application.