Set Rails configuration parameters using environment variables
Add this line to your Rails application's Gemfile:
gem 'env_rails'
And then execute:
$ bundle
This gem is a Railtie plugin. It doesn't require any special configuration.
When the Rails application starts it will pick up any environment variable matching a name like RAILS_CONFIG__foo__bar and apply the value to the corresponding Rails configuration.
For example:
RAILS_CONFIG__action_mailer__smtp_settings__address=smtpserver.yourdomain.com
- Fork it ( https://github.com/manastech/env_rails/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request