Skip to content
Configatron/Rails integration for per-environment project-wide configuration variables.
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.



ConfigatronRails is a plugin born out of a want for environment-specific
variables using a gem I’ve grown to appreciate:

h3. Installation / Upgrading

Make sure you have configatron (2.0 or higher) installed before following these steps!

> sudo gem install configatron

  1. Or toss this in your environment.rb (preferred method)
    config.gem “configatron”

cd vendor/plugins
git clone git:// configatron_rails
cd configatron_rails
git checkout 0.4
cd ..
rm -rf configatron_rails/.git
cd ../..
script/generate config

If upgrading, run script/generate config again, as this will copy the necessary
initializer file over. Just don’t overwrite your config.yml. ;)

h3. Sample Usage:

In config.yml

    development: &local
      site_address: http://localhost:3000/

test: <<: *local production: site_address:

In ‘script/console development’ and ‘script/console test’

    >> configatron.site_address  # => "http://localhost:3000/"

In ‘script/console production’

    >> configatron.site_address  # => ""

h3. Version History

  • 0.4 – Updated for configatron 2.1.1, changed to initializer script
  • 0.3 – Updated for configatron 2.0
  • 0.2.1 – Minor tweaks to template file
  • 0.2 – Environment seeding of config.yml based upon database.yml
  • 0.1 – First Release

Copyright © 2008 Cody Maggard, released under the MIT license

Something went wrong with that request. Please try again.