This is step by step instructions on how to run your app locally in the production environment.
- Add
gem 'rails_12factor'to your Gemfile. This will add error logging to the command line and the ability for your app to serve static assets. - run
bundle - run
bundle exec rake secretand copy the output - in
application.ymlset the secret_key to match whatsecret.ymlis expecting (<%= ENV["SECRET_KEY_BASE"] %>) - in
database.ymlunderproduction:delete username and password - run
rake assets:precompile- This will create a folder public/assets that contains all of your assets. - run
RAILS_ENV=productions rake db:create db:migrate db:seedordb:setup - fire up the server with
http://localhost:3000
- Remember to clobber your assets (
rake assets:clobber) and re-precompile (rake assets:precompile) if you make changes to your assets.