In Ruby on Rails you have always 3 environments.
- development
- test
- production
by default you are working in “development” environment. You can control the environments by setting the “RAILS_ENV” as a system variable in your operating system. Under Linux or Mac OS X you can enforce the environment by adding this variable to you “/etc/bashrc” file.
export RAILS_ENV="test"
On the production Server it should look like this:
export RAILS_ENV="production"
Another way to enforce the ruby environment is to set the Variable directly in the “environment.rb” file in you ruby on rails app. Like this:
ENV['RAILS_ENV'] = 'development'
This worked for me pretty good.