Skip to content

Instantly share code, notes, and snippets.

@lujanfernaud
Last active May 24, 2018 10:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lujanfernaud/e2bb41c81e97a53e731171dfc5e8ebf8 to your computer and use it in GitHub Desktop.
Save lujanfernaud/e2bb41c81e97a53e731171dfc5e8ebf8 to your computer and use it in GitHub Desktop.
Running a Rails 5 App in Production Locally

Running a Rails 5 App in Production Locally

This is what we need to do:

export RAILS_ENV=production
rake db:reset
rake assets:precompile
RAILS_SERVE_STATIC_FILES=true
SECRET_KEY_BASE=production rails s

We might need to comment out the lines with the username and password for the production database in config/database.yml.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment