How to build task 'elasticsearch:import:model&

2019-03-16 13:35发布

Well, I have elasticsearch-rails gem installed (version 0.1.5) and I can clearly see the task inside the gem files.

But when I run

bundle exec rake environment elasticsearch:import:model CLASS='Comment'

I get this error.

Running rake environment -D doesn't show me the task either.

elasticsearch is running, if I curl http://localhost:9200 it responds me.

Why isn't this working?

1条回答
该账号已被封号
2楼-- · 2019-03-16 13:51

you need create elasticsearch.rake

cat lib/tasks/elasticsearch.rake
require 'elasticsearch/rails/tasks/import'
查看更多
登录 后发表回答