首先,我登录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)
确实给我取了结果