Oracle GlassFish Server 3.0.1 Scripting Framework Guide

ProcedureTo Deploy a Rails Application as a Directory Using the asadmin Command

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.

Before You Begin

These instructions build upon the example hello application described in Creating a Simple Rails Application.

  1. Start the GlassFish Server domain to which you want to deploy the application:

    asadmin start-domain domain-name
  2. Change to the directory where you created the sample application.

    For example:

    cd /apps/jruby-apps/hello
  3. Deploy the hello application with asadmin command:

    as-install/bin/asadmin deploy hello
    • If you want to use a different JRuby instance than the update installation or the instance you configured with the configure-jruby-container command, you can use the following deploy-time option:

      asadmin deploy --property jruby-home=jruby-install
  4. Run the hello application using the following URL in your browser: