I’m using rails 2.0.5 and mongrel.
I have a Page and a Source models.
class Source < ActiveRecord::Base
class Page < ActiveRecord::Base
Basically I’m listing pages with their sources; In production and
development ( I use mongrel_cluster in the first and a single mongrel
on the second) I got this error:
ActiveRecord::AssociationTypeMismatch (Source expected, got Fixnum):
raise_on_type_mismatch' /vendor/rails/activerecord/lib/active_record/associations/ belongs_to_association.rb:22:inreplace’
The fact that scares me a lot is that I get it on random basis and
reloading the page solves it.
It looks like that sometimes the record isn’t retrieved correctly from
the db but instead it got a fixnum.
The fact that is a random behaviour doesn’t give me any clue on how to