Tom Styles
2006-Mar-15 13:01 UTC
[Ferret-talk] ActiveRecord::RecordNotFound in search results act_as Ferret
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 -- Posted via ruby-forum.com.
Jens Kraemer
2006-Mar-15 13:15 UTC
[Ferret-talk] ActiveRecord::RecordNotFound in search results act_as Ferret
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: 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 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
Tom Styles
2006-Mar-15 13:32 UTC
[Ferret-talk] ActiveRecord::RecordNotFound in search results act_as Fe
Jens Kraemer wrote:> You should really use the one from the svn repository as described > there: projects.jkraemer.net/acts_as_ferret > The plugin repository is > svn://projects.jkraemer.net/acts_as_ferret/trunk/plugin/acts_as_ferretThanks 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 -- Posted via ruby-forum.com.
Tom Styles
2006-Mar-15 13:37 UTC
[Ferret-talk] ActiveRecord::RecordNotFound in search results act_as Fe
Tom Styles wrote:> Jens Kraemer wrote: >> You should really use the one from the svn repository as described >> there: 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 > TomIgnore that, I''ve worked it out now. projects.jkraemer.net/acts_as_ferret/browser/trunk/plugin/acts_as_ferret/lib/acts_as_ferret.rb Thanks Tom -- Posted via ruby-forum.com.
Jens Kraemer
2006-Mar-15 13:41 UTC
[Ferret-talk] ActiveRecord::RecordNotFound in search results act_as Fe
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: 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 projects.jkraemer.net/acts_as_ferret/wiki . Jens -- webit! Gesellschaft f?r neue Medien mbH 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