Sun GlassFish Enterprise Server v3 Scripting Framework Guide

ProcedureTo Create the Rails Application That Accesses Java Libraries

  1. Change to the directory you want to create an application.

    /apps/jruby-apps/

  2. Create an application by running this command:

    jruby -S rails imageprocess
  3. Open the imageprocess/config/environment.rb file in a text editor.

  4. Follow steps 2 and 3 from the instructions in, To Use Rails Without a Database.

  5. Change to the imageprocess directory you just created.

  6. Create a controller and default view for the application by running this command:

    jruby script/generate controller home index
  7. Change to the imageprocess/app/views/home directory.

  8. Create a second view by copying the default view to seeimage.html.erb:

    cp index.html.erb seeimage.html.erb