Ferret 搜索不适用于我的 Rails 应用程序
首先,我登录到ruby script/console -e production
并尝试使用索引每个表
Model.rebuild_index
它工作正常并返回true
然后我使用命令启动了ferret服务器
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) 确实获取了我的结果
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
使用以下命令安装操作系统的 wordnet 数据文件的副本:
Word 实际上是从 Wordnet 派生的:
Installed the copy of the wordnet data files for OS using :
Word is actually derived from Wordnet :
没什么奇怪的
ActiveRecord 没有方法重建索引
Nothing surprising
ActiveRecord has no method rebuild-index