I just upgraded from Rails 2.2.2 to Rails 2.3.2, and found that running rake db:migrate fails now in production mode, unless I add "-- require ''config/environment''" between "rake" and "db:migrate". The error complains that model classes referenced in our migrations are not defined. In development mode, everything works as usual. Is this to be expected, or have I missed some step in the upgrade? Thanks, --Paul
Jeffrey L. Taylor
2009-Jul-16 03:46 UTC
Re: rake db:migrate failing in production in 2.3.2
Quoting Paul E. G. Lynch <plynchnlm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:> > I just upgraded from Rails 2.2.2 to Rails 2.3.2, and found that > running rake db:migrate fails now in production mode, unless I add "-- > require ''config/environment''" between "rake" and "db:migrate". The > error complains that model classes referenced in our migrations are > not defined. In development mode, everything works as usual. >rake db:migrate RAILS_ENV=production It works fine for me on two different Rails 2.3.2 Linux hosts (OpenSuSE 10.3 on an IBM ThinkPad and Debian 5.0 on an Amazon EC2 instance). What is the error message and/or symptoms? Jeffrey