README

The sample application is taken from Agile Web Development with Rails, 2nd Edition, published by the Pragmatic Bookshelf and reproduced with permission; see the license file for terms of use. Please visit www.PragmaticProgrammer.com for more great books to help keep you on top of your game.

The Depot sample application requires the MySQL database server.

Creating the Sample Databases

Before you can run this project, you must create at a minimum the depot_development database, as described below. You can also create the test and production databases if desired.

To Create the Depot Databases:

  1. Open a command window.

  2. If it has not already been started, start the MySQL database server.

  3. Type the following command to create the development database and press Enter.
    mysqladmin -u root -p create depot_development
    Note: If the root user does not have a required password, omit the -p argument.

  4. (Optional) Repeat the command to create the depot_test and depot_production databases.

Configuring The Database Environment

The database.yml file is already configured to use the MySQL adapter and the three depot databases. You do not need to do any configurations unless the root user requires a password.

To Specify the Password for the Root User:

  1. In the Projects window, expand the Configuration node.

  2. Double-click the database.yml node to open the file in the editor.

  3. In each of the three configurations (development, test, and production), provide the password.

  4. Close and save the file.

Creating the Database Tables

This sample project contains the schema migrations for creating and seeding the database tables.

To Create the Depot Tables:

Running the Application

You are now ready to run the Depot application.

To Run the Depot Application:

  1. In the Projects window right-click the Depot Application project node and choose Run from the pop-up menu.

  2. To view the Admin pages browse to the appropriate URL:


  3. Log in using admin for the user name, and secret for the password.

  4. To access the REST interface, enter the following URLs: