-
Type: Bug
-
Resolution: Duplicate
-
Priority: 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.
- 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.
- See init.png. The initialization is correct, at least that part the :read value which is a hash.
- Since 6.0.0, the read mode ("primary") is taken out of the hash. See read_mode.png
- 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.
- duplicates
-
RUBY-1595 Improve error reporting when symbol/string is passed as read preference
- Closed