Just wanted to follow up on this. I found out that it''s because one
of my log/mongrel.pid files got erased, so when mongrel was
restarting, it couldn''t kill one of them. Then it kept running with
old classes loaded. So one of my three mongrels had old classes
loaded, explaining why it only happened sometimes.
-Andrew
On Apr 16, 3:43 pm, "Andrew Roth"
<andrewr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> I have a model
>
> class Person < CimHrdb
> ...
> belongs_to :local_province, :foreign_key =>
> "person_local_province_id", :class_name =>
"Province"
> ...
> end
>
> (where CimHrdb extends some classes (with abstract_class = true) that
> eventually extend ActiveRecord::Base)
>
> and I''m getting
>
> A NoMethodError occurred in reports#crisis_management:
>
> undefined method `local_province'' for #<Person:0x40eec754>
> [RAILS_ROOT]/vendor/rails/activerecord/lib/active_record/base.rb:
> 1799:in `method_missing''
>
> The confusing thing is that it happens every once in a while.
It''s
> not every time. I can''t figure out why. It seems to not set up
the
> local_province method at times. This is on a production mongrel
> server, btw.
>
> -AndrewRoth
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---