Further investigation has established that the setting of environment variables has the following effect within deployment:
- The environment-specific configuration files (such as
config/environments/production.rb
) - installation of gems as defined within the Gemfile group (e.g.
group :production
)
In this case heroku requires the gem 'rails_12factor'
to enable static assets to be served. Therefore in addition to the group :production
this gem is required for :staging
.