• 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

      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. backtrace.png
          backtrace.png
          1.33 MB
        2. init.png
          init.png
          199 kB
        3. read_mode.png
          read_mode.png
          198 kB
        4. validate.png
          validate.png
          247 kB

            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: