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 secret
and copy the output - in
application.yml
set the secret_key to match whatsecret.yml
is expecting (<%= ENV["SECRET_KEY_BASE"] %>
) - in
database.yml
underproduction:
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:seed
ordb: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.