Rails test database migrations

One problem it took me ages to spot was that my test database wasn’t up to date with my migrations and therefore my tests kept failing for no obvious reason! So remember to:

rake db:test:prepare

To ensure the test database is up to date with migrations, etc.

Written on 28 Dec 2008 and categorised in CommandLine, Database, Rails, and Ruby, tagged as db and test

Home, Post archive

site copyright Eric Freeman

Valid XHTML 1.0 Strict