Working with the Mongrel Web Server

Mongrel is the standard web server normally used for developing and testing Ruby on Rails web applications (it's sometimes used for deployment also). Usually you start and stop Mongrel from a UNIX shell, but Track Magic can take care of this for you. Track Magic can also directly open your default web browser to specific pages in your Rails application.

The Mongrel Menu

When the main Track Magic window is open you can use the Mongrel menu to start and stop the server. To start the server, just make sure that the application you want to use is selected and choose Start Web Server from the Mongrel menu.

001_StartMongrelMenu

An icon appears in the application list indicating that the web server for this application is currently active.

002_MongrelRunningIcon

Once the server is turned on a list of the tables in the Rails application appears at the bottom of the Mongrel menu.

003_MongrelTablesMenu

Choosing one of these tables will open the corresponding index page in your default web browser.

004a_MongrelIndexPage

Working with Mongrel Within a Panorama Database

When a Panorama database that is linked to a Rails table is open, you can start and stop Mongrel from the Open Rails Web Page submenu of the Rails menu.

005_StartMongrelRailsMenu

The first three items in this submenu open pages from your Rails application in the default web browser. In addition to the index page, you can also open pages for displaying and editing the current record.

Automatically Starting Mongrel when the Panorama Database Opens

If you'd like Mongrel to start running automatically whenever the local Panorama is opened, open the Local Database Options… dialog (in the Rails menu) and check the Automatically Launch Mongrel option.

006_AutoStartMongrel

Automatically Stopping Mongrel

If you don't explicitly stop Mongrel, Track Magic will shut it down automatically when you quit the Panorama application. (This only applies if Panorama started Mongrel. If you want Mongrel to continue running even if you quit Panorama, launch Mongrel manually with Terminal.app.)