I fork staging server from production server. But staging server environment is still "production" , i want to change it to "staging" so that staging server read its on config/environment/staging.rb. I am following this link still no success. Adding a staging environment to the workflow
Asked
Active
Viewed 264 times
1 Answers
5
You will need to set the _RAILS_ENV_ config var to staging.
heroku config:set RAILS_ENV=stagin --app my-staging-app
where my-staging-app is to be replaced with the real name of your staging app on heroku.

Pascal
- 8,464
- 1
- 20
- 31
-
1i did so and then i ran "heroku run rails console -a getpayad-staging" to check my environment but it shows this error : "/app/vendor/bundle/ruby/2.2.0/gems/aws-sdk-v1-1.66.0/lib/aws/rails.rb:110:in `load_yaml_config': config/aws.yml is missing a section for `staging` (RuntimeError) " – Haseeb Ahmad Apr 07 '16 at 09:52
-
**How things go better when one posts the error!** Well... then do exactly as the error says. Edit config/aws.yml and create a section for staging. You probably have a section for production: there already, then copy it to staging: and try again. – Ed de Almeida Apr 07 '16 at 10:00
-
i got this error after adding section in aws.yml named staging and add copy production data into that section. – Haseeb Ahmad Apr 07 '16 at 10:02
-
Yeah issue on my side there is also need to update secret.yml – Haseeb Ahmad Apr 07 '16 at 10:08