Configuring an Application’s Host Connection

If you’ve worked with Rails before you know that the connection between the Rails app and the server is controlled by the database.yml file. The Host Connection dialog (Application menu) can set up the database.yml file for you.

001_HostConnectionDialog

This dialog has three tabs — development, production and test. Each tab is independent and allows you to set up the corresponding Rails environment.

Using a Favorite Host

If the host you want to use is already in your list of favorites (see Managing Hosts) you can simply choose it from the Hosts menu.

002_HostsMenu

When you choose a host from this menu Track Magic automatically fills in all of the connection options for you. (Note: Only the current environment is affected.)

Setting up a Host Manually

If a host isn't in the list of favorites you can set it up manually (or, better yet, add it to the list of favorites). Start by using the pop-up menu to choose the adapter — SQLite, MySQL, etc. (If you are choosing MySQL you must choose whether the server is local, on your machine, or remote, on another machine.)

003_HostServers

When you choose an adapter the dialog will adjust to display the connection options for that adapter.

Automatically Creating the SQL Database

If you use the SQLite adapter the database will be created automatically when you create the first table. If you are using the MySQL adapter Track Magic will automatically create the SQL database if the Automatically Create Databases option is enabled for that host (see Managing Hosts). In all other cases you must make separate arrangements to create the SQL database.