I am trying to setup a staging env for my app on Heroku. And everytime I push my repo it deploys/runs the application in production
mode. What do I need to do to make the app run in some other mode.
See the last section in this Heroku article on Configuration and Config Vars.
In brief, though:
$ heroku config:add RACK_ENV=staging RAILS_ENV=staging
Also be careful not to miss the note that accompanies that section:
You should never set
RACK_ENV=development
, as that will enable reloading and slow down your app’s dyno significantly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With