Environments

Hello all

I am returning to rails after a moving in with asp.net mvc for a while, I have setup rails on a centos server with passenger, I have set the rails environment as production within my httpd config, when I do rake about it show the environment as development, Please can anyone advise what I have missed.

Thank you in advance

Beagle

Quoting BeagleBen <steven@stevencahill.co.uk>:

Hello all

I am returning to rails after a moving in with asp.net mvc for a while, I
have setup rails on a centos server with passenger, I have set the rails
environment as production within my httpd config, when I do rake about it
show the environment as development, Please can anyone advise what I have
missed.

You are running production in your webserver (presumably on port 80) and
development on the command line. This is normal. They are separate contexts.
The httpd config only applies to the Web server, not a terminal session. If
you would start Webrick or other Rails server from the command line, it would
run the development environment on port 3000. If you want to run in
production mode from the command line, type "export RAILS_ENV=production" in
bash or the equivalent in other shells (e.g. "RAILS_ENV=production; export
RAILS_ENV" in sh).

HTH,
  Jeffrey

Many thanks for your help with this

Steven