耙子流产了!不知道如何构建任务'mongoid_search:index'

时间:2013-10-17 06:45:12

标签: search ruby-on-rails-3.2 mongoid

您好我正在尝试rake mongoid_search:index并且它给了我这个错误。

rake aborted!
Don't know how to build task 'mongoid_search:index'
/home/user/.rvm/gems/ruby-1.9.3-p448@app/bin/ruby_executable_hooks:15:in `eval'
/home/user/.rvm/gems/ruby-1.9.3-p448@app/bin/ruby_executable_hooks:15:in `<main>'
(See full trace by running task with --trace)

2 个答案:

答案 0 :(得分:2)

经过精炼搜索后,我能够找出错误。

在我的gemset中我有两个版本的mongoid(2.x,3.x)。所以,我删除了旧版本并添加了

我的lib / tasks文件夹中的

Mongoid Rake文件解决了我的问题。

答案 1 :(得分:2)

我通过将主人添加到gem来修复错误,从https://github.com/mauriciozaffari/mongoid_search/issues/67

引用

gem'mongoid_search',github:'mauriciozaffari / mongoid_search',branch:'master'