Forum: Ferret ActiveRecord::RecordNotFound in search results act_as Ferret

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Ecf15b0bccba46fe1285f392b3ad0dde?d=identicon&s=25 Tom Styles (tomstyles)
on 2006-03-15 14:01
Hello,

I've installed the Ferret gem and also got the act_as_ferret code from
the wiki.
I've set up my model "Branch" to act as ferret using the code below.

acts_as_ferret :options => {:fields => ['name', 'body_text', 'address']}

I've also set up a ferret_controller with the code below

def find
  if params[:search_terms]
    @branch_results = Branch.find_by_contents(params[:search_terms])
    render_text @branch_results.inspect
  end
end

I've done some updates and the index files seem to be being generated
ok.
If I go to mywebapp/ferret/find?search_terms=gamston where "gamston" is
the name of one of the branches I get

--- []

as the result.
If I go to mywebapp/ferret/find?search_terms=* I get

ActiveRecord::RecordNotFound in Ferret#find
Couldn't find Branch with ID=5

There are no Branches with an ID of 5. Does anyone have any ideas whats
going on with my system. I tried my best to trouble shoot the issue but
to no avail.

Any help is appreciated.
Tom Styles
C9dd93aa135988cabf9183d3210665ca?d=identicon&s=25 Jens Kraemer (Guest)
on 2006-03-15 14:20
(Received via mailing list)
Hi!

On Wed, Mar 15, 2006 at 02:01:56PM +0100, Tom Styles wrote:
> Hello,
>
> I've installed the Ferret gem and also got the act_as_ferret code from
> the wiki.
> I've set up my model "Branch" to act as ferret using the code below.
>
> acts_as_ferret :options => {:fields => ['name', 'body_text', 'address']}

I'd say that must read
acts_as_ferret :fields => ['name', 'body_text', 'address']

What Version of acts_as_ferret are you using ?

You should really use the one from the svn repository as described
there: http://projects.jkraemer.net/acts_as_ferret/
The plugin repository is
svn://projects.jkraemer.net/acts_as_ferret/trunk/plugin/acts_as_ferret

Kasper Weibel and me are actively working on the plugin there, the Code
in the Wiki is more or less outdated. There also is a small rails
project
utilizing the plugin, under
svn://projects.jkraemer.net/acts_as_ferret/trunk/demo


Jens

--
webit! Gesellschaft für neue Medien mbH          www.webit.de
Dipl.-Wirtschaftsingenieur Jens Krämer       kraemer@webit.de
Schnorrstraße 76                         Tel +49 351 46766  0
D-01069 Dresden                          Fax +49 351 46766 66
Ecf15b0bccba46fe1285f392b3ad0dde?d=identicon&s=25 Tom Styles (Guest)
on 2006-03-15 14:32
Jens Kraemer wrote:
> You should really use the one from the svn repository as described
> there: http://projects.jkraemer.net/acts_as_ferret/
> The plugin repository is
> svn://projects.jkraemer.net/acts_as_ferret/trunk/plugin/acts_as_ferret

Thanks Jens,
I'm having a lot of difficulty connecting to the svn because of our
firewall. Are there any other ways in which the files can be downloaded.

Thanks
Tom
Ecf15b0bccba46fe1285f392b3ad0dde?d=identicon&s=25 Tom Styles (Guest)
on 2006-03-15 14:37
Tom Styles wrote:
> Jens Kraemer wrote:
>> You should really use the one from the svn repository as described
>> there: http://projects.jkraemer.net/acts_as_ferret/
>> The plugin repository is
>> svn://projects.jkraemer.net/acts_as_ferret/trunk/plugin/acts_as_ferret
>
> Thanks Jens,
> I'm having a lot of difficulty connecting to the svn because of our
> firewall. Are there any other ways in which the files can be downloaded.
>
> Thanks
> Tom

Ignore that, I've worked it out now.
http://projects.jkraemer.net/acts_as_ferret/browse...
Thanks
Tom
C9dd93aa135988cabf9183d3210665ca?d=identicon&s=25 Jens Kraemer (Guest)
on 2006-03-15 14:44
(Received via mailing list)
On Wed, Mar 15, 2006 at 02:32:28PM +0100, Tom Styles wrote:
> Jens Kraemer wrote:
> > You should really use the one from the svn repository as described
> > there: http://projects.jkraemer.net/acts_as_ferret/
> > The plugin repository is
> > svn://projects.jkraemer.net/acts_as_ferret/trunk/plugin/acts_as_ferret
>
> Thanks Jens,
> I'm having a lot of difficulty connecting to the svn because of our
> firewall. Are there any other ways in which the files can be downloaded.

I attached an archive containing the current trunk to the wiki front
page at http://projects.jkraemer.net/acts_as_ferret/wiki .

Jens

--
webit! Gesellschaft für neue Medien mbH          www.webit.de
Dipl.-Wirtschaftsingenieur Jens Krämer       kraemer@webit.de
Schnorrstraße 76                         Tel +49 351 46766  0
D-01069 Dresden                          Fax +49 351 46766 66
This topic is locked and can not be replied to.