Uploaded image for project: 'Ruby Driver'
  1. Ruby Driver
  2. RUBY-528

Index missing when using MongoClient instead of Connection

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.8.3
    • Affects Version/s: 1.8.1
    • Component/s: None
    • None
    • Major Change

      Hello,

      Basically I started a new project with the new version of the Ruby driver and when I tried to save an image to GridFS, I got the following error:

      Mongo::OperationFailure: Database command 'filemd5' failed: (errmsg: 'need an index on

      { files_id : 1 , n : 1 }

      '; ok: '0.0').

      This is something I never encountered before. I have looked at many things but then realized that the class Connection is now deprecated and should be replaced by MongoClient. I did not think this small change could fix the problem but it did.

      So because it is deprecated, I guess it is not really a bug, but as long as Connection is kept for scaffolding, it should probably work the same way.

      Thank you.
      Have a nice day,
      Mig

            Assignee:
            emily.stolfo Emily Stolfo
            Reporter:
            mig Mig
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: