Oracle GlassFish Server 3.0.1 Scripting Framework Guide

ProcedureTo Create the Rails Application That Accesses Java Libraries

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


  2. Create an application by running this command:

    jruby -S rails imageprocess
  3. Open the imageprocess/config/environment.rb file in a text editor, and modify the file as described in To Use Rails Without a Database.

  4. Change to the imageprocess directory you just created.

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

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

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

    cp index.html.erb seeimage.html.erb