7

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?

Cœur
  • 37,241
  • 25
  • 195
  • 267
renatojf
  • 734
  • 2
  • 11
  • 29
  • Just to confirm: you've got elasticsearch-rails in your Gemfile and have `bundle install`ed? – Shadwell Sep 16 '14 at 20:47
  • I do have it. But this thing is just too unstable to use. I managed to import my model manually, but now it returns 0 results. – renatojf Sep 16 '14 at 21:21

1 Answers1

15

you need create elasticsearch.rake

cat lib/tasks/elasticsearch.rake
require 'elasticsearch/rails/tasks/import'
Xiaofei Bao
  • 196
  • 1
  • 4