To install the GlassFish v3 Gem on your JRuby standalone instance, use the following procedure:
Download and install JRuby and Rails according to the instructions in To Install JRuby in Standalone Mode.
Run the Gem installer to install the GlassFish v3 Gem:
jruby -S gem install glassfish
Start your server with the following command:
jruby -S glassfish