Ill try to explain the problem a bit better, i would like to deploy my
rails app with a single command using capistrano, and have it work as
soon as deployment has completed. Problem is that the only way i can run
my application in production mode on my host is by uncommenting the line
in environment.rb to set it to production, if its commented out, it
seems to run in development.
So i have a choice, manually uncomment that line after a deployment, or
uncomment that line, and save it to subversion ready for a deployment.
My plan was to do the second option, and set RAILS_ENV to development on
my local development system to overide the setting in environment.rb.
In the process of doing this i discovered that if the line
ENV[‘RAILS_ENV’] ||= ‘production’, was uncommented in environment.rb,
and i had not locally set RAILS_ENV to development, my application would
still run as development using webrick.
I wanted to understand whether webrick ignored environment.rb and it
only had meaning to Apache? or if i had inadvertantly set it to
development in some other way - basically i wanted to understand how
this was possible.
I really appreciate your help Jason, thanks.