Ruby gem for defining which environment variables must be set in order for your Rails application to function properly.
Add this line to your application's Gemfile
:
gem 'env-dependencies'
And then execute:
$ bundle install
Define an env_dependencies
array in config/application.rb
like so:
class Application < Rails::Application
config.env_dependencies = [
"CDN_URL",
"JAVA_HOME",
"ROLLBAR_ACCESS_TOKEN",
"UI_DIR"
]
end
When your Rails application starts, an error will be raised immediately if any environment variables are not set. A nice precautionary measure!
If you find this gem useful, you may also like path-dependencies.