0

I have a rails app that is using heroku_san to deploy to heroku. when i run rake staging console it gives me a console to the staging site on heroku. However, when I run

>Rails.env
=> "production"

this is the output. Here is my heroku.yml file:

production:
  app: live
  stack: cedar
  config: &default_config
    RAILS_ENV: production
    RACK_ENV: production
    BUNDLE_WITHOUT: "development:test"
  addons:
    - sendgrid:starter
    - heroku-postgresql:dev


staging:
  app: staging
  stack: cedar
  config: 
    <<: *default_config
    RAILS_ENV: staging
    RACK_ENV: staging
    BUNDLE_WITHOUT: "development:test"
  addons:
    - sendgrid:starter
    - heroku-postgresql:dev

What am I doing wrong? Everything else seems to be working, but it's running in the production environment no matter what I do. Here are some other heroku.yml configs i've tried to no avail:

staging:
  app: staging
  stack: cedar
  config: 
    <<: *default_config
    RAILS_ENV: staging
    RACK_ENV: staging
    BUNDLE_WITHOUT: "development:test"
  addons:
    - sendgrid:starter
    - heroku-postgresql:dev

...

staging:
  app: staging
  stack: cedar
  config: default_config
    RAILS_ENV: staging
    RACK_ENV: staging
    BUNDLE_WITHOUT: "development:test"
  addons:
    - sendgrid:starter
    - heroku-postgresql:dev

Any insight would be a great help as to what i'm doing wrong. there are some other values i'd like to set in this file but i need them to be different for the app to work.

Please help. Thanks in advance!

afxjzs
  • 982
  • 3
  • 10
  • 19

1 Answers1

0

Figured it out. It wasn't until i ran:

heroku config:add RAILS_ENV=staging --remote staging
heroku config:add RACK_ENV=staging --remote staging

that it actually showed as running in 'staging' mode on heroku.

afxjzs
  • 982
  • 3
  • 10
  • 19