-
Type: Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
If any model have an invalid index specification, the db:mongoid:create_indexes task should fail, but it never does.
$ rake db:mongoid:create_indexes; echo $?
ERROR: Invalid index field nil; should be one of Mongo::ASCENDING (1), Mongo::DESCENDING (-1) or Mongo::GEO2D ('2d').
0
When this task is used as a part of a migration, the migration does not cancel and the error just disappears. Failing rake tasks should fail with a non-zero exit code and cancel all following tasks from executing.