Heroku uses a production configuration instead of an intermediate configuration

I run two applications on Heroku, one of which is myapp-production, and the other is myapp production.

For some reason, however, the middleware uses the production environment configuration, rather than the intermediate configuration that I defined in staging.rb.

How I installed the middleware application was launched

heroku create --stack cedar --remote staging 

and then

 heroku config:add RACK_ENV=staging --app myapp-staging 

However, myapp-staging still uses the production configuration. Any ideas why and how to solve them?

+6
source share
2 answers

It is important to add RAILS_ENV = stage too

 heroku config:add RAILS_ENV=staging --app myapp-staging 
+9
source

Did you restart your speakers ( heroku restart ) after making this change to your configuration?

0
source

Source: https://habr.com/ru/post/915037/


All Articles