Cucumber testing with rails on mongoid-gridfs

Posted by Deepak Lamichhane on Stack Overflow See other posts from Stack Overflow or by Deepak Lamichhane
Published on 2010-12-29T04:50:13Z Indexed on 2010/12/29 4:53 UTC
Read the original article Hit count: 300

Filed under:
|
|

I am getting this weird error while running cucumber test:

ERROR Mongo::OperationFailure: Database command 'filemd5' failed: {"errmsg"=>"exception: best guess plan requested, but scan and order required: query: { files_id: ObjectId('4d1abab3a15c84139c00006e') } order: { files_id: 1, n: 1 } choices: { $natural: 1 } ", "code"=>13284, "ok"=>0.0}

I have a list of similar scenarios, where first scenario passes but all the other following scenario fails. I searched for it and I found that there is problem with indexing. But, I am not sure about what query to write. Furthermore, I can add the query on the mongo of the development. I want to make sure that the indexing is done in test too. If anyone has any idea on this, feel free.

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about cucumber