Environment Check

Environment Check is a plugin that checks to ensure the application environment RAILS_ENV matches the database environment. In the event that the application environment doesn’t match the database environment (say by accidentally running development against production) an exception is thrown along the lines of:

Incorrect database 'production'; expected 'development'

The plugin assumes you have a model class named SystemSetting which supports looking up values using standard enumeration-like indexing and that the record containing the value for the database environment is named environment.

Dependencies

Installation

EDGE

To install using SVN:
ruby script/plugin install svn://rubyforge.org/var/svn/redhillonrails/trunk/vendor/plugins/environment_check

or using HTTP:
ruby script/plugin install http://redhillonrails.rubyforge.org/svn/trunk/vendor/plugins/environment_check

2.0 Stable

To install using SVN:
ruby script/plugin install svn://rubyforge.org/var/svn/redhillonrails/branches/stable-2.0/vendor/plugins/environment_check

or using HTTP:
ruby script/plugin install http://redhillonrails.rubyforge.org/svn/branches/stable-2.0/vendor/plugins/environment_check

1.2 Stable

To install using SVN:
ruby script/plugin install svn://rubyforge.org/var/svn/redhillonrails/branches/stable-1.2/vendor/plugins/environment_check

or using HTTP:
ruby script/plugin install http://redhillonrails.rubyforge.org/svn/branches/stable-1.2/vendor/plugins/environment_check

1.1.6 Release

To install using SVN:
ruby script/plugin install svn://rubyforge.org/var/svn/redhillonrails/tags/release-1.1.6/vendor/plugins/environment_check

or using HTTP:
ruby script/plugin install http://redhillonrails.rubyforge.org/svn/tags/release-1.1.6/vendor/plugins/environment_check