I just spent a couple of hours trying to track down a maddening tricky
Here’s the backstory…
I’m developing in OSX using locomotive and rails 1.1.2
My application suddently started behaving very inconsistently. I would
go to a controller and the first time I went there, everything would
work fine. If I refreshed, or hit another action, I would start getting
errors like this…
undefined method `count’ for Announcement:Class
Huh? It just worked a second ago! ‘count’ is even defined by
ActiveRecord! What’s going on here?
By process of elimination, I eventually figured out how I screwed
The other day, I had been messing with mocks. I was adding in some
methods that I wanted to use for testing and development, but which
would not be needed for production. I wanted my development mocks to
be the same as my testing mocks. Being lazy, I simply set up a symbolic
link between the development mock directory and the testing mock
directory. Seems fine. Worked from the console and everything.
It seems that this symbolic linking does something that confuses rails.
I have no idea if this causes problems on other OS’s or with files in