You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have successfully loaded templates 01-basic.rb and 02-pretty.rb, however the load of the 03-expert.rb template fails with an ArgumentError: wrong number of arguments (given 1, expected 0) message. The error occurs when the template's line 325 rake "environment elasticsearch:import:model CLASS='Article' BATCH=100 FORCE=y" is executed, resulting in the following output:
rake aborted!
ArgumentError: wrong number of arguments (given 1, expected 0)
/usr/local/bundle/gems/activerecord-6.1.3.1/lib/active_record/relation/batches.rb:128:in 'find_in_batches'
/usr/local/bundle/gems/activerecord-6.1.3.1/lib/active_record/querying.rb:22:in 'find_in_batches'
/usr/local/bundle/gems/elasticsearch-model-7.1.1/lib/elasticsearch/model/proxy.rb:121:in 'method_missing'
/usr/local/bundle/gems/elasticsearch-model-7.1.1/lib/elasticsearch/model/adapters/active_record.rb:105:in '__find_in_batches'
/usr/local/bundle/gems/elasticsearch-model-7.1.1/lib/elasticsearch/model/importing.rb:161:in 'import'
/usr/local/bundle/gems/elasticsearch-rails-7.1.1/lib/elasticsearch/rails/tasks/import.rb:80:in 'block (3 levels) in '<main>'
/usr/local/bin/bundle:23:in 'load'
/usr/local/bin/bundle:23:in '<main>'
Tasks: TOP => elasticsearch:import:model
(See full trace by running task with --trace)
I'm running the code in Docker version 20.10.5 container in Docker's Desktop for Mac, version 3.2.2.
I'm new to Ruby, Rails and Elasticsearch so I don't know what steps to take next to solve this problem. I did try using 'byebug' in searchable.rb, and have reproduced the var all output from the step before the error and at the error stage in case it is helpful in suggesting what I should attempt next.
I opened a PR with a fix for this. If you're impatient, you can update your Gemfile entry for elasticsearch-model to use the fix before they merge the fix and release a new version:
I have successfully loaded templates 01-basic.rb and 02-pretty.rb, however the load of the 03-expert.rb template fails with an ArgumentError: wrong number of arguments (given 1, expected 0) message. The error occurs when the template's line 325
rake "environment elasticsearch:import:model CLASS='Article' BATCH=100 FORCE=y"
is executed, resulting in the following output:ruby --version && rails --version
I'm running the code in Docker version 20.10.5 container in Docker's Desktop for Mac, version 3.2.2.
I'm new to Ruby, Rails and Elasticsearch so I don't know what steps to take next to solve this problem. I did try using 'byebug' in searchable.rb, and have reproduced the
var all
output from the step before the error and at the error stage in case it is helpful in suggesting what I should attempt next.The text was updated successfully, but these errors were encountered: