users@glassfish.java.net

Re: JRoR WAR deployment to GF3 fails

From: Vivek Pandey <Vivek.Pandey_at_Sun.COM>
Date: Sat, 01 Aug 2009 20:10:35 -0700

Hassan Schroeder wrote:
> On Fri, Jul 31, 2009 at 7:47 PM, Martin Gainty<mgainty_at_hotmail.com> wrote:
>
>> curious if your Ruby scripts use a cgi interpreter
>> or a servlet based solution
>>
>
> Using the standard Goldspike servlet runner (packaged by Warbler).
>
>
It is jruby-rack and not Goldspike servlet. On GlassFish v3 server there
are 2 ways you can run a Rails/Sinatra/Merb or any rack compliant
application.

1. Just run your jRuby/Rack application without any special packaging by
simply deploying on glassfish v3 server. This is made possible thru v3
container pluggability extension (Sniffer,Container,Deployer) and uses
implements a GrizzlyAdapter to directly hookup HTTP layer with Rails or
MErb or any other Rack based ruby framework.

$ asadmin deploy yourRailsAppDir/

Of course you would need to set jruby.home JVM property (which is
deprecated) or use

$ asadmin jruby-container-config --jruby-home=...

or use deploy time property

$ asadmin deploy --property jruby.home=... yourRailsAppDir/

2. Use warbler gem, which uses jruby-rack, to create a WAR file and
deploy on GlassFish v3 or v2.

$ cd yourRailsAppDir/
$ warble
$ asadmin deploy yourRailsAppDir.war

-vivek.