Creating database-backed web applications was described in To Create a Database-Backed Rails Application. The following task describes running the created books application on the GlassFish v3 Gem. You can alternatively deploy it to your regular GlassFish Server using directory-based deployment, as described in To Deploy a Rails Application as a Directory Using the asadmin Command.
Change to /books directory.
Deploy the application to the GlassFish v3 Gem by running the following command:
jruby -S glassfish books
Run the application in your web browser using the following URL:
The opening page says “Listing books” and has an empty table, meaning that there are no book records in the database yet. To add book records to the table, do the next step.
Add records to the table by clicking the New book link on the index.html page.
Enter the data for book on the new.html page and click Create.