Saturday, August 27, 2011

Ruby on Rails Apache passenger defaults to production environment

I have been playing with ROR. I had been experimenting with WebRick server that comes with rails but default.
I tried to test my app with apache passenger module/mod_rails.
Passenger will assume the environment as 'production'.
On the other hand when you use rake db:migrate command it works for the 'development' environment.

If you want to use passenger for testing/development enviroment use the
rake db:migrate RAILS_ENV=production command.

or set the RailsEnv in your .conf file or in a .htaccess file(If AllowOverride is  set ).
For details visit here.

No comments:

Post a Comment

About Me

Web Developer From Dhaka, Bangladesh.