Leave config/environments/* files alone

Under “config/environment”, we see files like development.rb, test.rb and production.rb.

Depending on the need, we need to configure different things in different environments. And that’s precisely why those files are there.

However, changing these files creates a problem - it makes it harder for the developer to see what the difference is between one environment and another.

So, as far as possible, we try not to change files under config/environments - instead, we try to change those values in initializers or we try achieving the same by adding a key in secrets.yml. In this way, we can see which environment has what value in a glance.