I have an app.json that looks like this (roughly):
{
"addons": [
"heroku-postgresql"
],
"env": {
"RAILS_MASTER_KEY": {
"description": "Key to decrypt Rails credentials.",
"require": true,
"generator": "secret"
},
"SAFE_EMAIL_DEST": {
"description": "Where to send emails when in safe mode.",
"required": false
}
},
"environments": {
"test": {
"scripts": {
"test": "bundle exec rake spec"
}
},
"staging": {
"env": {
"SAFE_EMAIL_DEST": "staging@example.com"
}
},
"production": {
}
}
}
but when I run the app, I get the error: RuntimeError (SAFE_EMAIL_DEST needs to be defined) meaning, that environment variable is not defined.
What am I missing? Why isn't it being defined? Is "staging" the correct environment name for an app in the staging state in a Heroku pipeline?