Skip to content

Instantly share code, notes, and snippets.

@anthonycrumley
Created December 1, 2016 01:41
Show Gist options
  • Save anthonycrumley/dc4ae1922c51f2773484252e2b614c99 to your computer and use it in GitHub Desktop.
Save anthonycrumley/dc4ae1922c51f2773484252e2b614c99 to your computer and use it in GitHub Desktop.
This runs a local script but connects to the heroku database.
DATABASE_URL=$(heroku config:get DATABASE_URL -a ednetwork) SECRET_KEY_BASE=$(heroku config:get SECRET_KEY_BASE -a ednetwork) LANG=$(heroku config:get LANG -a ednetwork) DISABLE_SPRING=1 RAILS_ENV=production RACK_ENV=production rails runner "puts School.first.inspect"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment