Sun GlassFish Enterprise Server v3 Scripting Framework Guide

ProcedureTo Use Rails Without a Database

Although Rails is intended for creating database-backed web applications, this example is simple enough that it doesn't require one. In this case, you must edit the enviroment.rb configuration file to indicate that your application does not use a database.

  1. Open hello/config/environment.rb file in a text editor.

  2. Look for the following pattern in the file:

    #config.frameworks -= [ :active_record, :active_resource, :action_mailer ]
  3. Remove the pound (#) character in the beginning of the line. The line should now read as follows:

    config.frameworks -= [ :active_record, :active_resource, :action_mailer ]
  4. Exit and save the file.