Thursday, January 29, 2009

Object is not missing constant Question!

when Rails says, "Object is not missing constant Question!" -- here's what happened:

You referenced a class that wasn't defined, so ActiveSupport's dependency resolver kicked in.

It loaded the appropriate file (in this case question.rb), but during the load an Exception was raised. The error was not, however, in your class definition, so the missing constant (Question) was successfully defined.

The resolver then catches that exception, expects that your class will not be defined but finds that it is, and decides to throw an "Object is not missing constant Question!" because it's confused.

No comments:

Post a Comment