Skip to content

Set Rails configuration parameters using environment variables

License

Notifications You must be signed in to change notification settings

dmitryck/env_rails

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EnvRails

Set Rails configuration parameters using environment variables

Installation

Add this line to your Rails application's Gemfile:

gem 'env_rails'

And then execute:

$ bundle

Usage

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

Contributing

  1. Fork it ( https://github.com/manastech/env_rails/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

About

Set Rails configuration parameters using environment variables

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%