Load different configuration for each environment

Sometimes is necessary load different configuration for each environment. This is a way to do it.

Add to config/environments/development.rb

Create config/environments/development_config.yml

Repeat the process with production environment.

The development file would be different for each developer, so is better to delete it from the repository:
cp config/environments/development_config.yml config/environments/development_config_sample.yml

Add to .gitignore
config/environments/development_config.yml

Leave a comment