One of the strengths of Rails is its ability to work with different server technologies (SQLite, MySQL, Oracle, etc.). Track Magic makes it easy to work with multiple hosts, both local and remote.
The Favorite Hosts Dialog
Track Magic keeps a list of the hosts you frequently use. To view and edit this list choose the Favorite Hosts command from the Track menu.
The first time you open this dialog Track Magic will scan your hard drive and build a list of all of the hosts used by your existing Rails applications (if any). You can then add new favorite hosts, modify the connection options for existing favorite hosts, or delete hosts from the list. You can also drag hosts up and/or down within the list (this changes the order in which the hosts are listed in menus). Once a host is set up as a favorite, it is very easy to configure a Rails application to use that host (more on that in a moment.
Configuring Host Connection Options
To modify the connection options for a particular host, double click on the host. This opens a new dialog for specifying the host connection settings.
The first line of the dialog allows you to set up a name for the host. This name is listed in the Hosts menu when you are editing the database.yml file (see Host Connection), so pick a name that means something to you.
The next seven options (Adapter, Host, Port, User, Password, Socket, Timeout and UTF8 encoding) specify the connection options for this host. This is the same configuration information that you would normally type into the database.yml file.
The final option, Automatically Create Databases, only applies to MySQL hosts. If this option is checked, Track Magic will automatically create new MySQL databases for you when you create a new Rails application. You should only enable this option if you have privileges for creating databases on the specified MySQL host.
Note: Changing the Host Connection options does not affect existing Rails applications. The host connection options for each individual application are controlled with the Host Connection dialog in the Application menu (see Host Connection).
Manually Adding a Favorite Host
To manually add a host, press the Add Host button. The new host will be added and the Host Connection dialog will appear, allowing you to set up the configuration for the new host.
Deleting a Favorite Host
To delete a host, press the - button to the left of the host name. Note: Deleting a host from the list of favorites doesn't prevent you from using that host — it simply removes it from the Host menu.
Re-Arranging the Favorite Hosts List
You can change the position of a host within the list by clicking on it and dragging it up or down. This changes the order of the items in the Host menu.
Re-Scanning for Favorite Hosts
The very first time you open the Favorite Hosts dialog Track Magic scans the database.yml files on your system and adds all of the hosts it finds to the list of favorites. If you ever need to scan again (for example if you’ve copied a number of Rails applications to your hard drive) just press the Scan Hosts button. Any hosts that aren’t already in the lists of favorites will be added to the list.