Using Heroku for staging environments is awesome! If you don’t believe me, ask… well ask anyone. It’s free and quick to set up!
The problem I ran into is that I have an application yaml file with settings for different. This works out all great until I remembered that Heroku always deploys with rails in the production environment. Low and behold my api calls did not work because calls to the api production url is not ready.
Anyway, that is enough setup. There are a few ways to go about this… this is what I did: (using the heroku gem)
heroku config:add RACK_ENV='staging'
Fortunatley the RAILS_ENV (and MERB_ENV for those that need it) are set mirroring RACK_ENV. Heroku says that you you should not be setting RAILS_ENV, MERB_ENV directly.
Hooray! Now everything is pointing where it needs to go and we can stage away!
