Closed khcr closed 9 years ago
Thanks for the posting the code!
In the new gem, we do it a bit differently: https://github.com/elasticsearch/elasticsearch-rails/blob/master/elasticsearch-rails/lib/elasticsearch/rails/tasks/import.rb#L87, not sure if the trick is still needed, but it has worked fine so far.
My models didn't load properly when I ran
rake environment tire:import:all
because I autoload models folders. I wrote in myapplication.rb
:config.paths.add "app/models", eager_load: true, glob: "*"
to load the subfolder models. After I got errors, I rewrote the import task like this:Maybe it can help. Thanks for the awesome work !