Rails needs a unique secret key with which to encrypt its sessions.
1. In Terminal, change directories to the app's home directory:
2. Generate the secret key with the following command:
3. Download the secrets.yml from the following location on the server:
4. Open the downloaded secrets.yml file in a text editor and replace the default secret key value
with the secret key generated in Terminal.
5. Use the FTP program to replace the secrets.yml file on the server with the one you just edited
6. Update the git repository with the following two commands:
7. While located in the app's home directory, run the following two commands in Terminal to tighten security:
Previous post: Configure the app's database.yml file
Next post: Add the Blacklight gem to the app's Gemfile
1. In Terminal, change directories to the app's home directory:
# cd /home/username/public_html/test-app2. Generate the secret key with the following command:
# bundle exec rake secret3. Download the secrets.yml from the following location on the server:
/home/username/public_html/test-app/config/secrets.yml4. Open the downloaded secrets.yml file in a text editor and replace the default secret key value
“<%= ENV["SECRET_KEY_BASE"] %>”with the secret key generated in Terminal.
5. Use the FTP program to replace the secrets.yml file on the server with the one you just edited
6. Update the git repository with the following two commands:
# git add .
# git commit -m “Updated database.yml and secrets.yml files”
7. While located in the app's home directory, run the following two commands in Terminal to tighten security:
# chmod 700 config db
# chmod 600 config/database.yml config/secrets.yml
Previous post: Configure the app's database.yml file
Next post: Add the Blacklight gem to the app's Gemfile
No comments:
Post a Comment