Application Configuration or Settings in Rails Applications

It is pretty common that you need to store settings in a rails applications.  You might do this via global variables/constants or other more complex mean.  Two recent rubygems have set out to solve this problem.  The first is rails-settings an ActiveRecord like storage of settings in the database.  It allows you to keep track of any global setting that you dont want to hard code into your rails app. You can store any kind of object. Strings, numbers, arrays, or any object.

Configatron is another alternative.  It is a super cool, simple, and feature rich configuration system for Ruby apps.  You can set defaults, use hashes, use yaml and even namespace configurations.  You can even do temp, delayed or dynamic configurations.  If you are currently using global variables/constants do yourself a favor and check one of these gems out.

Step up to the mic.

Your email address will not be published.