Forum: Ferret Acts_As_Ferret No Method Errors

Dfbd9f734dcde8883f0b966b34cd002e?d=identicon&s=25 Nova Pon (gnovah)
on 2009-09-10 23:38
I've been trying to use Acts_as_Ferret, but all I can get are no method
errors. For example, if I try in a rails console
Item.find_id_by_contents("whatever")
it returns "NoMethodError: undefined method `find_id_by_contents' for
#<Class:0x4943140>".  I do have acts_as_ferret in my model rb file, and
the ferret gem installed.

I'm a newbie to rails.  Is there a way I can check that I have aaf
installed correctly?  Doing "ruby script/plugin install
svn://projects.jkraemer.net/acts_as_ferret/tags/stable/acts_as_ferret"
as most tutorials say didn't seem to do anything or produce anything in
my vendor/plugins folder, so I downloaded a zip file from the github
site and extracted it to vendor/plugins/acts_as_ferret.

Also I find it confusing what is the "current, correct way" to install
and use aaf---is it now as an acts_as_ferret gem?  And also has
find_id_by_contents now been replaced by find_with_ferret (which also
didn't work for me), or is it vice versa?

Please help, thanks!
Nova
D91de5cd48aa5538eec321f7a0934a4d?d=identicon&s=25 Ashif Manjur (ashif_manjur)
on 2010-01-04 20:44
you can only use the aaf to search for your rails applications. you have
to run the plugin installation command while staying in the application
dir you want to install it.

Nova Pon wrote:
> I've been trying to use Acts_as_Ferret, but all I can get are no method
> errors. For example, if I try in a rails console
> Item.find_id_by_contents("whatever")
> it returns "NoMethodError: undefined method `find_id_by_contents' for
> #<Class:0x4943140>".  I do have acts_as_ferret in my model rb file, and
> the ferret gem installed.
>
> I'm a newbie to rails.  Is there a way I can check that I have aaf
> installed correctly?  Doing "ruby script/plugin install
> svn://projects.jkraemer.net/acts_as_ferret/tags/stable/acts_as_ferret"
> as most tutorials say didn't seem to do anything or produce anything in
> my vendor/plugins folder, so I downloaded a zip file from the github
> site and extracted it to vendor/plugins/acts_as_ferret.
>
> Also I find it confusing what is the "current, correct way" to install
> and use aaf---is it now as an acts_as_ferret gem?  And also has
> find_id_by_contents now been replaced by find_with_ferret (which also
> didn't work for me), or is it vice versa?
>
> Please help, thanks!
> Nova
This topic is locked and can not be replied to.