当我跑步时
rake environment tire:import CLASS='Article.all' INDEX='mongo-articles' FORCE=true
在弹性搜索中导入数据
** Invoke environment (first_time)
** Execute environment
** Invoke tire:import (first_time)
** Execute tire:import
[IMPORT] Deleting index 'mongo-articles'
rake aborted!
undefined method `tire' for #<Tire::Results::Collection:0xabec954>
/home/helios/.rvm/gems/ruby-1.9.3-p484@munksearch/gems/tire-0.5.1/lib /tire/tasks.rb:55:in `block (2 levels) in <top (required)>'
Tasks: TOP => tire:import
有谁知道如何解决这个问题?
答案 0 :(得分:0)
从.all
删除Article.all
。
rake environment tire:import CLASS='Article' INDEX='mongo-articles' FORCE=true
此外,我建议删除INDEX参数,看看是否有帮助。