• Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.6.2
    • Component/s: None
    • None
    • Environment:
      Ruby on Rails, ruby 2.5.1
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Here is a coding error. It is not related to the database, seem to be a driver only error.

      My server environment works but my RSpec tests don't work.

      1. See backtrace.png for the error. It's all about the mongo and mongoid gems. I tried with mongoid 6.1.1, 6.2.1 and 6.4.2. Although the error message is a bit different with 6.1.1.
      2. See init.png. The initialization is correct, at least that part the :read value which is a hash.
      3. Since 6.0.0, the read mode ("primary") is taken out of the hash. See read_mode.png
      4. Finally, the options :read value is no longer a hash (of course, it was taken out of it in step 3). This causes the exception we see in step 3. The validate call errors out.

       

       

        1. read_mode.png
          198 kB
          Patrice Gagnon
        2. init.png
          199 kB
          Patrice Gagnon
        3. validate.png
          247 kB
          Patrice Gagnon
        4. backtrace.png
          1.33 MB
          Patrice Gagnon

            Assignee:
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Reporter:
            patrice4mongo Patrice Gagnon
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              None
              None
              None
              None