06-10-2008, 10:29 AM
I have a RoR app setup on my account and in the environment.rb file, I've uncommented the line:
ENV['RAILS_ENV'] = 'production'
Also, in the cpanel, the app is switched to "production" mode.
When I view the site in the browser, it is indeed the production version that is being displayed (I know because of the log files and which database is being accessed).
But when I run something like "rake db:migrate" it tries to migrate the development database and when I run "script/console" it loads the development environment.
I know I can "make" it run on either environment, but why would it default to the dev environment?
Greg
ENV['RAILS_ENV'] = 'production'
Also, in the cpanel, the app is switched to "production" mode.
When I view the site in the browser, it is indeed the production version that is being displayed (I know because of the log files and which database is being accessed).
But when I run something like "rake db:migrate" it tries to migrate the development database and when I run "script/console" it loads the development environment.
I know I can "make" it run on either environment, but why would it default to the dev environment?
Greg