I’m just posting this because I have been fiddling around with a Rails 1.2 application for days in utter frustration due to an obscure problem. Every time I tried to load a page, I got an error message like this:
Mon Feb 05 11:22:35 -0500 2007: Error calling Dispatcher.dispatch #<NameError: cannot remove Object::COPYRIGHT>
The name of the object that couldn’t be removed has varied. The
NameError has also caused a number of other problems that basically left my application dead. Today some searching revealed the problem. In Rails 1.2, you must put
include statements inside class definitions. I had the line:
outside a class definition and it blew up my whole application. Fun.
This blog post is provided as a service to the next person who runs into this problem.