There are two general ways to deploy a Rails application on GlassFish Server:
Deploy it as a directory to the GlassFish Server domain, using either the asadmin deploy command or the GlassFish Server Administration Console.
Run it using GlassFish v3 Gem.
The reminder of this section explains how to deploy a Rails application to GlassFish Server as a directory. For more information about running Rails applications using GlassFish v3 Gem, see To Run a Rails Application on GlassFish v3 Gem.
These procedures provide only the most basic deployment instructions. For comprehensive information about deploying applications to GlassFish Server, refer to the Oracle GlassFish Server 3.0.1 Application Deployment Guide.
The following procedure explains how to use the asadmin command to deploy the sample hello application as a directory within a GlassFish Server domain, and how to access the application from your web browser. You can also use these same instructions to deploy any Rails application to GlassFish Server.
These instructions build upon the example hello application described in Creating a Simple Rails Application.
Start the GlassFish Server domain to which you want to deploy the application:
asadmin start-domain domain-name
Change to the directory where you created the sample application.
Deploy the hello application with asadmin command:
as-install/bin/asadmin deploy hello
Run the hello application using the following URL in your browser:
As with the instructions in To Deploy a Rails Application as a Directory Using the asadmin Command, this procedure builds upon the example hello application described in Creating a Simple Rails Application.