Environments

3 views
Skip to first unread message

BeagleBen

unread,
May 31, 2012, 6:31:34 PM5/31/12
to rubyonra...@googlegroups.com
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


Jeffrey L. Taylor

unread,
May 31, 2012, 11:31:51 PM5/31/12
to rubyonra...@googlegroups.com
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

BeagleBen

unread,
Jun 1, 2012, 12:59:11 PM6/1/12
to Ruby on Rails: Talk
Many thanks for your help with this

Steven
Reply all
Reply to author
Forward
0 new messages