interaction design

Tools: Startup

Running Ruby on Rails

Once you have Ruby on Rails installed you should test it before you begin building any applications.  Running the pre-installed cookbook or typo-2.6.0 applications will confirm that Rails is correctly installed and you are doing everything right.

Directory Structure

First note InstantRails’ directory structure.

Start InstantRails

  1. To start InstantRails - execute InstantRails.exe (see the root InstantRails directory)
  2. If it’s the first time you have run InstantRails then it needs to reconfigure its paths relative to where you unpacked it. You’ll get a dialog like this:
  3. Just click OK.

Stop Apache

  1. InstantRails will start. You should see the following InstantRails control panel.
  2. Since we won’t be using the Apache web server for development on our local machines we need to Stop it.  We will use a smaller, quicker web server suited to application development – like WebBrick, Mongrel or Lighttpd.
  3. You should see the “traffic light” indicator turn red. 
  4. Apache has been stopped.

Test InstantRails

Test InstantRails to make sure it’s working.

  1. Start one of the pre-installed applications that comes with InstantRails.  In this case Cookbook and Typo which are in the rails_apps directory.
  2. Click on the “I” symbol at the top-left of the InstantRails control panel.  Choose “Rails Applications”, and then “Manage Rails Applications”.
  3. The Rails Applications dialog appears.
  4. Select either the “cookbook” or “typo-2.6.0” application by selecting the adjacent checkbox. Then the “Start with Mongrel” button.  If you are using an earlier version of InstantRails, then you will start the application with WEBrick.
  5. The web server starts and you should see a terminal window (or DOS screen) open indicating the server has started.  Note the port number on the first line i.e. 3001 in this case.  But most likely it will be 3000.  Note it.  You’ll need this in the URL later.
  6. Also note that you can stop the server at any time with keystrokes of CTRL-C.

It Works!

Finally we open our favourite (standards-compliant) browser and type in the following URL:
http://localhost:3001/recipe/list

  1. You should see something like this:
  2. This confirms that InstantRails is running correctly.