Search code examples
ruby-on-railsrubymongodbrakemoped

rake aborted! The operation: "GET MORE"


I am getting the below error when I run the rake task. Can any one help me?

Error

rake aborted!
The operation: "GET MORE"
failed with error "cursor 178700246530 not found"
C:/Ruby193/lib/ruby/gems/1.9.1/gems/moped-1.3.2/lib/moped/node.rb:210:in `get_more'

My Rake Code

MyCollection.where(:name => "abc").each do |comp|   
 l =     open(comp.logo_url)
 comp.logo = l
 comp.save!
end

Thanks in advance


Solution

  • Try to use with find_in_batches with your collection .