On Wed, Aug 29, 2007 at 11:47:39AM +0100, James Adam wrote:
> What this *might* mean is that there's some error in either your model
> or your observer file that's causing a silent failure when the class
> is loaded. I saw this recently when a model depended on a file that
> wasn't required until the bottom of environment.rb - because the
> observer caused the model to be loaded before the rest of
> environment.rb had been processed, but the code which the model
> depended on hadn't been loaded yet, it would silently fall over and
> the problem looked like it was in the observer.

Yeah, Rails has the nasty habit of sometimes eating up exceptions.
Then everything seems fine until much later when something fails for
some inexplicable reason.

Sometimes running script/console reveals these errors by displaying
a message somewhere.  Other times, it does not.  Try removing the
observer loading statement and run script/console and refer to
the class.  That should trigger it to autoload, and if there's an
error it will show up.  Rails only drops errors in some circumstances,
not in others.

By the way: Please don't start a new topic by replying to another one.
This confuses mailclients that support threading.   (replying causes
your mailclient to set an In-Reply-To header which tells my client
that this is a reply in the previous thread and it displays it as
such)

Regards,
Peter Bex
Solide ICT - http://www.solide-ict.nl
_______________________________________________
Engine-Users mailing list
[email protected]
http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org

Reply via email to