undefined method `find'

Hello,

I have an application with multiple models that works perfectly fine in
both development and production.

Now I added yet another model & database table 'Cluster' - no
fundamental difference to the other models I added before.

All calls to this model from the regular application on the production
server
such as 'Cluster.find(:last)' - or any other request that you could
think of that involves Cluster or clusters - result in:

undefined method `find' for Cluster:Module

Hello,

I have an application with multiple models that works perfectly fine in
both development and production.

Now I added yet another model & database table 'Cluster' - no
fundamental difference to the other models I added before.

All calls to this model from the regular application on the production
server
such as 'Cluster.find(:last)' - or any other request that you could
think of that involves Cluster or clusters - result in:

undefined method `find' for Cluster:Module

Sounds like you've got something else called Cluster that is only
loaded sometimes but which shadows your model when it is loaded

Fred

Frederick Cheung wrote:

Frederick Cheung wrote:

such as 'Cluster.find(:last)' - or any other request that you could
think of that involves Cluster or clusters - result in:

undefined method `find' for Cluster:Module

Sounds like you've got something else called Cluster that is only
loaded sometimes but which shadows your model when it is loaded

Fred

Hello Fred, thanks. The only thing I could think of is the
mongrel_cluster. Do you think just renaming the Cluster model
everywhere
into something else could do the trick?
Thanks. Justus

That's what it looks like. When running under mongrel my app has a
Cluster constant (but not under webrick) and the things in there
certainly look mongrel-related.

Fred

Hello Fred, thanks. The only thing I could think of is the
mongrel_cluster. Do you think just renaming the Cluster model
everywhere
into something else could do the trick?
Thanks. Justus

That's what it looks like. When running under mongrel my app has a
Cluster constant (but not under webrick) and the things in there
certainly look mongrel-related.

Fred

Dear Fred, Thanks so much for your help! That solved the problem. Justus