-
Notifications
You must be signed in to change notification settings - Fork 1
running the server
dwemhoen edited this page Mar 13, 2013
·
2 revisions
Before running the server for the first time, be sure to generate a secret. First use generate a random key using:
rake secret
Next create a new file config/initializers/secret_token.rb. In this file, add a single line:
Autoadvisor::Application.config.secret_token = "<secret key>"
You can run the server locally easily with the following command:
rails server -e development
To run the production server locally, you'll need to set the Amazon RDS environment variables. Running source ./fake_prod.sh does this for you:
export RDS_USERNAME="root"
export RDS_PASSWORD="password"
export RDS_HOSTNAME="127.0.0.1"
export RDS_PORT="3306"
Assuming there is a mysql server running there, the production server is as simple as rails server -e production.