Jerome posted the instructions to build GlassFish v3 Gem for JRuby – very simple and easy. A binary version of Gem is available here.
- Software pre-requisite
- Subversion client (for example Tigris)
- Maven 2.0.x
- JRuby 1.0.x (I used JRuby 1.0.2 and lets say installed in
JRUBY_HOME). Make sureJRUBY_HOME/binis in your path.
- Build the Gem
-
As explained in Jerome’s entry, you can check out complete GlassFish v3 workspace or just the Gem code. Here is how you’ll check out only the Gem code on a Windows machine using Tigris Subversion client:

And after the check out is complete, you’ll see:

- Build the gem by giving the command:
mvn installAnd success is achieved by seeing the following in the console:
[INFO] (in C:/workspaces/glassfish/gem/target/dependency/glassfish)
[WARNING] mkdir -p pkg
[INFO] Successfully built RubyGem
[INFO] Name: GlassFish
[WARNING] mv GlassFish-10.0.0-java.gem pkg/GlassFish-10.0.0-java.gem
[INFO] Version: 10.0.0
[INFO] File: GlassFish-10.0.0-java.gem
[INFO] [install:install]
[INFO] Installing C:\workspaces\glassfish\gem\target\gem-10.0-SNAPSHOT.jar to C:\Users\Arun Gupta\.m2\repository\org\glassfish\distributions\gem\10.0-SNAPSHOT\gem-10.0-SNAPSHOT.jar
[INFO] [install:install-file {execution: install-gem}]
[INFO] Installing C:\workspaces\glassfish\gem\target\dependency\glassfish\pkg\GlassFish-10.0.0-java.gem to C:\Users\Arun Gupta\.m2\repository\org\glassfish\distributions\GlassFish-Gem\10.0-SNAPSHOT\GlassFish-Gem-10.0-SNAPSHOT.gem
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2 minutes 2 seconds
[INFO] Finished at: Fri Nov 16 17:56:12 PST 2007
[INFO] Final Memory: 11M/20M
[INFO] ------------------------------------------------------------------------The Gem is available in
target\dependency\glassfish\pkgdirectory.
-
- Install the Gem
- Change to the directory where the Gem is available
cdtarget\dependency\glassfish\pkg - Install the Gem as:
C:\testbed\ruby\jruby-1.0.2\bin\jruby -S gem install GlassFish-10.0.0-java.gem
Successfully installed GlassFish, version 10.0.0
- Change to the directory where the Gem is available
And use it!
Please leave suggestions on other TOTD that you’d like to see. A complete archive is available here.
Technorati: totd v3 jruby ruby rubyonrails glassfish gem jrubyonglassfish
Related posts:- TOTD #13: Setup Mongrel for JRuby-on-Rails applications on Windows
- TOTD # 71: JRuby and GlassFish Integration Test #2: JRuby 1.2.0 RC1 + Rails 2.2.x + GlassFish v3 Prelude
- TOTD #24: Getting Started with Rails 2.0.x in JRuby 1.0.3 and JRuby 1.1RC1
- TOTD #55: How to build GlassFish v3 Gem ?
- TOTD #33: Building GlassFish v3 Workspace
[Trackback] JRuby 1.0.3 was recently released and so was Rails 2.0. I decided to try JRuby 1.0.3 + Rails 2.0 and realized that a few additional steps (because of Rails 2.0) are required to get a trivial Hello World applcation…
Comment by Arun Gupta's Blog — December 21, 2007 @ 11:20 am
[Trackback] Pramod published an updated JRuby Gem for GlassFish v3. Download the gem here. Here are the updates from last time: The Gem is now smaller – 2.4 MB instead of 2.9 MB (approx 20% smaller). The Gem is now using…
Comment by Arun Gupta's Blog — January 5, 2008 @ 6:27 am