Getting "ArgumentError ( isn't a valid directory argument

I’m hoping someone has encountered this before. I’m using AAF trunk and
trying to multi_search across 2 models. It works fine on my windows
(Webricks) dev env but now that i’ve deployed to linux, (Apache,
FastCGI) I’m getting the following error:

ArgumentError ( isn’t a valid directory argument. You should use either
a String or a Directory):
/vendor/plugins/acts_as_ferret/lib/multi_index.rb:82:in initialize' /vendor/plugins/acts_as_ferret/lib/multi_index.rb:82:inensure_searcher’
/vendor/plugins/acts_as_ferret/lib/multi_index.rb:51:in
query_parser' /vendor/plugins/acts_as_ferret/lib/multi_index.rb:60:inprocess_query’
/vendor/plugins/acts_as_ferret/lib/multi_index.rb:26:in
search_each' /vendor/plugins/acts_as_ferret/lib/class_methods.rb:442:inid_multi_search’
/vendor/plugins/acts_as_ferret/lib/class_methods.rb:422:in
multi_search' /app/controllers/search_controller.rb:8:inquery’

Anybody know what might be causing this?

Thanks, Dave

Upon further inspection, it looks like the real error is:

error opening …/config/…/index/production/[class_index_dir] IO Error
occured at <except.c>:79 in xraise

I’ve checked the permissions on my index dir and it’s 755. The owner is
the same as that running the app. Any ideas how to troubleshoot?

thanks

On Sun, Dec 17, 2006 at 12:00:04AM +0100, Dave To wrote:

Upon further inspection, it looks like the real error is:

error opening …/config/…/index/production/[class_index_dir] IO Error
occured at <except.c>:79 in xraise

I’ve checked the permissions on my index dir and it’s 755. The owner is
the same as that running the app. Any ideas how to troubleshoot?

what Ferret version do you use ? multi_search seems to be broken with
the latest ferret, for me 0.10.11 seemed to work.

Jens


webit! Gesellschaft für neue Medien mbH www.webit.de
Dipl.-Wirtschaftsingenieur Jens Krämer [email protected]
Schnorrstraße 76 Tel +49 351 46766 0
D-01069 Dresden Fax +49 351 46766 66

Hi Jens, I’m running ferret 0.10.13. I think this could be the reason
why. I altered my code to run find_by_contents(query) and it works fine.
Looks like multi-search on AAF doesn’t jive yet with the latest ferret.
Thanks for the tip.

Hi, i have the same problem with ferret 0.10.11. Some can help me?

Jens K. wrote:

On Sun, Dec 17, 2006 at 12:00:04AM +0100, Dave To wrote:

Upon further inspection, it looks like the real error is:

error opening …/config/…/index/production/[class_index_dir] IO Error
occured at <except.c>:79 in xraise

I’ve checked the permissions on my index dir and it’s 755. The owner is
the same as that running the app. Any ideas how to troubleshoot?

what Ferret version do you use ? multi_search seems to be broken with
the latest ferret, for me 0.10.11 seemed to work.

Jens


webit! Gesellschaft f�r neue Medien mbH www.webit.de
Dipl.-Wirtschaftsingenieur Jens Kr�mer [email protected]
Schnorrstra�e 76 Tel +49 351 46766 0
D-01069 Dresden Fax +49 351 46766 66

Hi Jens, I’m running ferret 0.10.13. I think this could be the reason
why. I altered my code to run find_by_contents(query) and it works fine.
Looks like multi-search on AAF doesn’t jive yet with the latest ferret.
Thanks for the tip.

Ignacio wrote:

Hi Jens, I’m running ferret 0.10.13. I think this could be the reason
why. I altered my code to run find_by_contents(query) and it works fine.
Looks like multi-search on AAF doesn’t jive yet with the latest ferret.
Thanks for the tip.

Hi, i have the same problem with ferret 0.10.11. Some can help me?

I find the problem. The method multi-search supposes that the index has
been constructed before. A solution can be to realize a find_by_contents
in all models at begin (to construct the indexes), some one knows other
better solution?

Aryk G. wrote:

So will the 0.10.11 version of this plugin fix this problem? Im getting
the error sporadically after the index was already built. I cant seem to
figure out whats causing it.

If it only happens sporadically, I would say that it might be because
the index hasn’t been built. Is there content in your index dir when you
encounter this?

So will the 0.10.11 version of this plugin fix this problem? Im getting
the error sporadically after the index was already built. I cant seem to
figure out whats causing it.

I find the problem. The method multi-search supposes that the index has
been constructed before. A solution can be to realize a find_by_contents
in all models at begin (to construct the indexes), some one knows other
better solution?

(re)building the index with rebuild_index sounds more approprate to me
than ‘to realize a find_by_contents’

HTH

Mischa

Are you suggesting that the content is getting deleted. This happens
after several successful searches using the index and then it crashes.
Everytime I check, there are index files in the index folder though…

dave wrote:

Aryk G. wrote:

So will the 0.10.11 version of this plugin fix this problem? Im getting
the error sporadically after the index was already built. I cant seem to
figure out whats causing it.

If it only happens sporadically, I would say that it might be because
the index hasn’t been built. Is there content in your index dir when you
encounter this?

On Wed, Feb 07, 2007 at 10:04:40PM +0100, Mischa B. wrote:

I find the problem. The method multi-search supposes that the index has
been constructed before. A solution can be to realize a find_by_contents
in all models at begin (to construct the indexes), some one knows other
better solution?

(re)building the index with rebuild_index sounds more approprate to me
than ‘to realize a find_by_contents’

yeah, however find_by_contents implicitly rebuilds the index if none
exists :wink:

Jens


webit! Gesellschaft für neue Medien mbH www.webit.de
Dipl.-Wirtschaftsingenieur Jens Krämer [email protected]
Schnorrstraße 76 Tel +49 351 46766 0
D-01069 Dresden Fax +49 351 46766 66

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs