Model validation causing rake db:migrate to fail silently

I added a migration that adds data with a model class, calling create().
Validation in the model class fails, so the rows aren’t being added to
the database. But when I run ‘rake db:migrate’, it says nothing about
the failures, causing me frustration when rake looks like it worked, but
the data doesn’t get loaded.

I’m new to rails; is there something I’m missing about getting rake (or
a migration, at least) to display its errors the same way that rails
does (at least via the scaffold)?

Thanks,
Dave

try using create! which will raise an exception if the record is
invalid.

Chris H. wrote:

try using create! which will raise an exception if the record is
invalid.

Awesome, that’s exactly what I want to see.

Thanks,
Dave