Monday, June 13, 2016

Configure the app's database.yml file

When the Rails app was created, it has a database configuration file that needs editing to make sure the app is communicating with the MySQL database.

1. Using a FTP program (such as Fetch or FileZilla), download the app's database config file located at

/home/username/www/test-app/config/database.yml

2. Open the database.yml file in a text editor (such as TextWrangler) and add the following to the defaults section under the pool variable:

host: 127.0.0.1

3. Go to the production section in database.yml and change the database and username to:

database: username_test-app_production
username: username_tester


Note that when we created the database we named it test-app_production, but the Bluehost system actually adds your username onto the beginning of the database name. Therefore, the full name of the database includes your username and needs to be used like that.

4. Change the password in the production section of database.yml to the password you set when creating the nrpp database user.

5. Use the FTP program to replace the existing database.yml file on the server with the one you just edited.


Previous post: Create a git repository for the app

Next post: Configure the app's secrets file

No comments:

Post a Comment