Rails 3.1.1 serious problems with model

I have a model called Well in my app stored in well.rb under app/models.
This has worked fine for quite some time. All of a sudden I noticed
that the whole Well section (model/controller/view) was behaving
strangely. I have tracked it down to the model not being recognized as
an ActiveRecord::Base object. I have reduced the model to its minimum,
here it is:


class Well < ActiveRecord::Base


When I load the Rails console and run


I get “Object” in response. While every other model correctly returns

ActiveRecord::Base type in response to superclass method call, e.g.,

Is there something obvious that I may be missing?

Thanks for your time in advance.


I had a similar ActiveRecord issue and the problem actually stemmed from
my gemfile. All I had to do was change one of my gems from:

gem ‘will_paginate’, ‘3.0.pre2’


gem “will_paginate”, “~> 3.0.2”

can you post your gemfile?

Thanks Mike.
A big mistake on my part. I had forgotten that I had defined a scratch
class called Well (what else?) in my lib folder for some computations.
This well class does not have an ancestor and therefore naturally
inherits from Object. It turned out that it was overriding my model
class definition. I do appreciate your time though :slight_smile:
And apologies for the trouble.