views:

146

answers:

1

I am trying to solve a strange issue with ferret/acts_as_ferret

Of course I have googled and posted the question: http://www.ruby-forum.com/topic/188570

Basically aaf works on single models with no issue. It also works on single models using the config/aaf.rb file I have setup. It even works when I do a multi-model search in the console, but within the rails app itself I get:

undefined method `ferret_rank=' for <object that has a match>

If anyone has had the same experience/problem and can shed any light I would appreciate it.

PS: I followed the following tutorial to get where I am now. http://opensoul.org/2008/4/29/using-shared-indexes-with-acts_as_ferret

+1  A: 

Do you have the plugin installed or just the gem? You might want to install the plugin.

I would also try rebuilding the index.

For my purposes, I switched to Solr and life is a lot easier. Sphinx is missing a lot of stuff that I need.

MattMcKnight
I spoke to Jens the author (who was on vacay - cheers mate) - he mentioned the model was not being extended properly. I had it purely in a gem, removed the gem config in envireonment.rb and installed the plugin. It works perfectly now.If anyone still gets this issues also try to require config/aaf.rb in your environment.rb.
Spasm