Hello, I can''t figure out how to get acts_as_ferret to stop segfaulting. Every time i run a query on my server (rails 1.1.4 and ferret .9.4 and aaf from svn) I get a segfault ./script/../config/../vendor/plugins/acts_as_ferret/lib/acts_as_ferret.rb:243: [BUG] Segmentation fault this line is where the indx is rebuilt. " def rebuild_index(*additional_models) index = Ferret::Index::Index.new(ferret_configuration.merge(:create => true)) " I can get index = Ferret::Index::Index.new to run from the console. But, If i try the above from a model, Employee.rebuild_index, it segfaults. a fresh check out from the same svn repo on my laptop works fine. it still segaults after chmod 777 index/ -R Any ideas? I sure would love to be able to use this. Thanks, Michael Fairchild -- Posted via http://www.ruby-forum.com/.
Hi Michael, On Fri, Jul 21, 2006 at 09:24:49AM +0200, Michael wrote:> Hello, > I can''t figure out how to get acts_as_ferret to stop segfaulting. > Every time i run a query on my server (rails 1.1.4 and ferret .9.4 and > aaf from svn) I get a segfault > > ./script/../config/../vendor/plugins/acts_as_ferret/lib/acts_as_ferret.rb:243: > [BUG] Segmentation fault > > this line is where the indx is rebuilt. > " > def rebuild_index(*additional_models) > index = > Ferret::Index::Index.new(ferret_configuration.merge(:create => true)) > " > > I can get index = Ferret::Index::Index.new to run from the console. > But, If i try the above from a model, Employee.rebuild_index, it > segfaults. > > a fresh check out from the same svn repo on my laptop works fine. it > still segaults after chmod 777 index/ -RDo you use the compiled version of Ferret on both laptop and server ? What does your call to acts_as_ferret look like, do you specify a custom analyzer or something like this ? Jens -- webit! Gesellschaft f?r neue Medien mbH www.webit.de Dipl.-Wirtschaftsingenieur Jens Kr?mer kraemer at webit.de Schnorrstra?e 76 Tel +49 351 46766 0 D-01069 Dresden Fax +49 351 46766 66
> Do you use the compiled version of Ferret on both laptop and server ?I beleive they are both compiled. My server is gentoo linux. To be sure I just did "gem install ferret" to see and it does indeed appear to be compilinmg on both my macbook and the server. Nothing Changed. I also tried changing my locale in enviornemnt.rb: ENV[''LANG''] = ''en_US.utf8'' ENV[''LC_TIME''] = ''C'' I also dumped by database and reimported after converting from latin one to utf8 as described here http://climbtothestars.org/archives/2004/07/18/converting-mysql-database-contents-to-utf-8/ and here http://textsnippets.com/posts/show/84. still didn''t change anything.> > What does your call to acts_as_ferret look like, do you specify a > custom analyzer or something like this ?I think they are pretty basic most are simple, except one line: acts_as_ferret(:fields => [''id'',''first_name'',''last_name'', ''email'', ''notes''], :occur_default => Ferret::Search::BooleanClause::Occur::SHOULD) I decided to comment out all the acts_as_ferret lines and add them back 1 at a time. At first i thought i had found the problem this way, but i was mistaken. Whenever the feret attempts to interact with the index, it segfaults /config/../vendor/plugins/acts_as_ferret/lib/acts_as_ferret.rb:243: [BUG] Segmentation fault I have noticed that all of my index dirs are empty. I mean the directory is there, i.e. index/development/boat, but they are all empty. Is there a way that i could try to manually build the index? Maybe that would help? Thanks for any help.> > Jens-- Posted via http://www.ruby-forum.com/.
On Mon, Jul 31, 2006 at 08:16:39AM +0200, Michael wrote:> > > Do you use the compiled version of Ferret on both laptop and server ? > I beleive they are both compiled. My server is gentoo linux. > To be sure I just did "gem install ferret" to see and it does indeed > appear to be compilinmg on both my macbook and the server. Nothing > Changed. > I also tried changing my locale in enviornemnt.rb: > ENV[''LANG''] = ''en_US.utf8'' > ENV[''LC_TIME''] = ''C'' > I also dumped by database and reimported after converting from latin one > to utf8 as described here > http://climbtothestars.org/archives/2004/07/18/converting-mysql-database-contents-to-utf-8/ > and here http://textsnippets.com/posts/show/84. > still didn''t change anything. > > > > > What does your call to acts_as_ferret look like, do you specify a > > custom analyzer or something like this ? > I think they are pretty basic > most are simple, except one line: > acts_as_ferret(:fields => [''id'',''first_name'',''last_name'', ''email'', > ''notes''], :occur_default => > Ferret::Search::BooleanClause::Occur::SHOULD)maybe this helps: you should not specify the id field in a call to acts_as_ferret. The id is indexed by default. Jens -- webit! Gesellschaft f?r neue Medien mbH www.webit.de Dipl.-Wirtschaftsingenieur Jens Kr?mer kraemer at webit.de Schnorrstra?e 76 Tel +49 351 46766 0 D-01069 Dresden Fax +49 351 46766 66