1

まず、にログインして、ruby script/console -e production各テーブルのインデックスを作成しようとしました

Model.rebuild_index 

正常に動作し、戻ってきましたtrue

次に、コマンドを使用してフェレットサーバーを起動しました

ruby script/ferret_server start -e production

次に、アプリケーションを開始しましたが、検索以外はすべて正常に動作しています。検索タブで検索しようとすると、次のようなエラーが表示されます。

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.

検索はコンソールで正常に機能しています

result = ActsAsFerret.find("admin",[User], :limit => 2)結果を取得しますか

4

2 に答える 2

0

以下を使用して、OS 用のワードネット データ ファイルのコピーをインストールしました。

sudo apt-get install wordnet-base

Word は実際には Wordnet から派生しています。

require 'word'
data =  Words::Wordnet.new
于 2011-12-14T11:23:43.580 に答える
-1


ActiveRecordにはrebuild-indexメソッドがありません

于 2011-10-31T07:31:22.743 に答える