GlassFish Updatecenter module for JRuby 1.0.3
Over the past weekend JRuby 1.0.3 was released and this time I wanted to ensure that we would have the GlassFish updatecenter module published at the earliest. This is version 2.1 of the module and would be available when you launch the updatetool from your GlassFish installation/updatecenter/bin directory of your GlassFish installation.
Contents of the JRuby on GlassFish 2.1 module
This JRuby update center module primarily consists of JRuby 1.0.3 and Goldspike revision 858. The JRuby 1.0.3 source bits that are part of this module, have been updated with the following gems :
- rails-1.2.6
- rake-0.7.3
- activesupport-1.4.4
- activerecord-1.15.6
- actionpack-1.13.6
- actionmailer-1.3.6
- actionwebservice-1.2.6
- ActiveRecord-JDBC-0.5
Installing the JRuby on GlassFish module
Let us refer to GlassFish root directory location as $GLASSFISH_ROOT for the course of this blog. After installing GlassFish run the Update Center client
$GLASSFISH_ROOT/updatecenter/bin/updatetoolThen you should see "JRuby on GlassFish" as one of the available modules.

Accept the license agreement to install this module. After the successful installation of this module, you would see a new directory "jruby" created under your GlassFish root directory. A screenshot of the directory structure after having installed the JRuby on GlassFish 2.1 module
If you had already installed the previous 2.0 module, updatetool would inform that there is an update available. In this case go to the "Available Updates" section and select JRuby on GlassFish 2.1 module and install it. In this case the directory structure would be
Web application modes
JRuby on GlassFish update center module bundles Goldspike and it supports the 2 modes - "Standalone" and "Shared", of deploying a RubyOnRails (ROR) application to a GlassFish application server instance. For this blog we would be using the directory deployment feature of GlassFish.
- "Standalone" mode implies that the resulting Web application archive (WAR) would be self contained, i.e. it would contain not only the application, but also the JRuby, Rails, Goldspike libraries.
- "Shared" mode implies that the WAR would just contain the WEB-INF/web.xml file along with the application. The libraries required for the application to run successfully would be picked up from the classpath of the GlassFish application server instance.
Post Installation steps
If you plan to use the "Shared" mode you would have to perform one additional step. After the successful installation of the JRuby update center module copy the required libraries to the GlassFish library directory and restart the GlassFish application server instance (for these libraries to be picked up by the running instance). Run the following command to achieve this :
ant -f $GLASSFISH_ROOT/jruby/install.xml setup-shared-env
Sample Applications
This module comes with 3 sample applications -
- HelloWorldRailsApp - a simple hello world application
- cookbook - sample created using instructions from O'Reilly OnLamp
- mephisto - version 0.7.3 of Mephisto blogging
Posted by pramodg [Sun] ( December 20, 2007 11:52 AM ) Permalink | Comments[3]
