1

First, I logged into the ruby script/console -e production and tried to index each table using

Model.rebuild_index 

It worked fine and returned true

I then started the ferret server using the command

ruby script/ferret_server start -e production

Then i started my application and it's all working fine except the search. When i try searching on the search tab, i get an error as follows :

Words::BadWordnetDataset in HomeController#search

Failed to locate the wordnet database. Please ensure it is installed and that 
if it resides at a custom path that path is given as an argument when 
constructing the Words object.

The search is working fine in the console

result = ActsAsFerret.find("admin",[User], :limit => 2) does fetch me results

Mithun Sasidharan
  • 20,572
  • 10
  • 34
  • 52
  • Maybe try replacing will_paginate with the gem? – alexs333 Oct 31 '11 at 07:07
  • So how should i go about it?? where should i make the changes? – Mithun Sasidharan Oct 31 '11 at 07:11
  • on the second thought it's nothing to do with will_paginate. I don't think ActiveRecord::Base doesn't even method rebuild-index.. Unless it's your own implementation of cause. – alexs333 Oct 31 '11 at 07:25
  • I think its a method of the gem Wordnet usef to index data in the database. But i am not able to install the Gem Wordnet also http://stackoverflow.com/questions/7950903/not-able-to-run-install-gems-using-gemfile – Mithun Sasidharan Oct 31 '11 at 07:28
  • Why would you like to rebuild the index? Changing the index is difficult, and if it is working, why to renumber it? – mliebelt Oct 31 '11 at 07:48
  • Could this possibly be a permissions problem in the file system? Just a wild guess really. – mu is too short Dec 08 '11 at 09:30
  • @muistooshort : what are you trying to say? Its working fine in the console. and am using wordnet gem in my app but not getting where exactly am getting the bug!!! – Mithun Sasidharan Dec 08 '11 at 09:32
  • Does Ferret write any files to the file system? Is your console and the web server running as the same user? The "works for me but not the server" symptom often indicates a file system permissions issue and that would explain the "Failed to locate the wordnet database." error. I'm just throwing some ideas out, hence a comment rather than an answer. – mu is too short Dec 08 '11 at 09:40
  • @muistooshort: so what should i do to get rid of this? which file permission settings should i change? – Mithun Sasidharan Dec 08 '11 at 09:42

2 Answers2

0

Installed the copy of the wordnet data files for OS using :

sudo apt-get install wordnet-base

Word is actually derived from Wordnet :

require 'word'
data =  Words::Wordnet.new
Mithun Sasidharan
  • 20,572
  • 10
  • 34
  • 52
-1

Nothing surprising
ActiveRecord has no method rebuild-index

antiqe
  • 1,125
  • 8
  • 17
  • I think its a method of the gem Wordnet usef to index data in the database. But i am not able to install the Gem Wordnet also http://stackoverflow.com/questions/7950903/not-able-to-run-install-gems-using-gemfile – Mithun Sasidharan Oct 31 '11 at 07:32