I’ve been running the super latest AAF plugin with a mongrel
cluster/ferret_server combo smoothly for a few days in production mode,
indexing 4 models with no surprises.
Only now when I try including some new Models to be indexed, the
ferret_server fails to index with
ferret server error undefined method `_’ for Summary:Class
(it creates the dir on index/production, tho)
and in the production log, I get
LoadError (Expected script/…/config/…/app/models/summary.rb to define
Summary):
(I can give you the full trace, but something tells me I must be doing
something really stupid here…)
I’ve tried this with another model as well, and rebuild_index always
fails with a similar undefined method `_’ .
These are pretty simple models, used mainly for holding text data that
can be versioned and used by other Models…
Any clues?
Cheers,
Fabio.
I think I found my problem. ferret_server runs your Model as a
standalone class, so if you’re using gettext in the model (which I am)
you’ll probably have to re-include gettext/rails and bind that to
whichever textdomain you’re using for your app (and that you’ve used in
your application.rb).
I’m still having some problem with the gettext redeclares on the Models
so that ferret can deal with them - Would a mock _() function pull the
trick?
Curiously enough, I don’t remember having to do that when running ferret
with a single mongrel instance, ie in development mode w/out
ferret_server. In fact, I’m almost positive that it worked flawlessly…
Cheers,
fabio.
Fabio Mont Alegre wrote:
I’ve been running the super latest AAF plugin with a mongrel
cluster/ferret_server combo smoothly for a few days in production mode,
indexing 4 models with no surprises.
Only now when I try including some new Models to be indexed, the
ferret_server fails to index with
ferret server error undefined method `_’ for Summary:Class
(it creates the dir on index/production, tho)
and in the production log, I get
LoadError (Expected script/…/config/…/app/models/summary.rb to define
Summary):
(I can give you the full trace, but something tells me I must be doing
something really stupid here…)
I’ve tried this with another model as well, and rebuild_index always
fails with a similar undefined method `_’ .
These are pretty simple models, used mainly for holding text data that
can be versioned and used by other Models…
Any clues?
Cheers,
Fabio.