In Ruby on Rails you have always 3 environments.
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.
On the production Server it should look like this:
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.