rake migrateI recently faced this output:
Not the most informative message in the world. Running with trace didn't really help me out either. The error I made, on it's own, is fairly easy to spot, but I was also trying to load records of type Foo in this migration. Because I was trying to load records, I thought perhaps the error was occurring in the local definition of the Foo class.
uninitialized constant CreateFooTable
(See full trace by running task with --trace)
Unfortunately, I missed the simple mistake. I had renamed the class to CreateFoosTable, because in Rails table names are plural.
Match the file name with the class name and everything works fine. A simple mistake that hopefully now we can both easily avoid in the future.