Topic: Deployment to production still says development environment

So after loads of work, I finally got my Rails app up using Mongrel and Capistrano. Feels good.

I haven't read much of the documentation, but I assumed the mongrel_cluster recipes do the migrations as well, but my production database still is empty.

No problem. I SSH into my production app (mollio) and rake db:migrate, only to see an error that mollio_development doesn't exist. Well, of course, because here my db is called mollio_production. So I look at my mongrel.log, and it says it's in production environment:

** Starting Mongrel listening at 127.0.0.1:8010
** Starting Rails with production environment...

So I open script console:
[current]$ script/console
Loading development environment.
>> ENV['RAILS_ENV']
=> "development"

So why does it say development? What am I missing? Is it somehow trying to load from my local machine even though I'm supposed to be working off the server -- or is it really in development?

Thanks for any help.

Re: Deployment to production still says development environment

You need to specify the environment when running script/console:

script/console production

Railscasts - Free Ruby on Rails Screencasts

Re: Deployment to production still says development environment

Thanks, Ryan. I think the issue is with my Mongrel config and my Apache config. I'll check that out.

Last edited by itchyboy (2007-03-30 07:50:52)