dan19460 (6) [Avatar] Offline
#1
I'm a bit new to RoR so perhaps this is clear to everyone but me...

After adding the rake commands to newdb.bat (listing 3.35) and executing successfully, I attempted to run the rake command as shown in section 3.6. Unfortunately, I received all kinds of errors indicating that the tables don't exist, etc. Well, it was clear that the tests were looking at the pomodo_test db rather than the pomodo_production db. I guess when you execute rake db:migrate and rake db:fixtures:load it operates against the current RAILS_ENV, which apparently is DEVELOPMENT by default. Obviously, nothing was created in test. Once I changed the RAILS_ENV=test and ran the newdb.bat and rake command, everything passed. Could you clarify the proper procedure here? Shouldn't the rake db:migrate and db:fixtures:load commands populate the test database as well? If not, what is the protocol here? BTW, I am using RoR 2.0.2, if that makes a difference. Thanks.