After upgrading mongoid-rspec it also upgrades mongoid from 6.2.1 to 6.4.0 and mongo from 2.4.3 to 2.5.1.
- mongo (2.4.3) - bson (>= 4.2.1, < 5.0.0) - mongoid (6.2.1) - activemodel (~> 5.1) - mongo (>= 2.4.1, < 3.0.0) + mongo (2.5.1) + bson (>= 4.3.0, < 5.0.0) + mongoid (6.4.0) + activemodel (>= 5.1, < 6.0.0) + mongo (>= 2.5.1, < 3.0.0) + mongoid-compatibility (0.5.1) + activesupport + mongoid (>= 2.0)
After this tests of my rails app failed with the following error:
undefined method `retry_writes?' for true:TrueClass
It happens when I am trying to update the image attributes.
def edit load_image @image.update_attributes shown_at: DateTime.now render layout: 'plain' end
Tracing back it shows me that the code really breaks is here: https://github.com/mongodb/mongo-ruby-driver/blob/master/lib/mongo/retryable.rb#L125
def retry_write_allowed?(session, write_concern) session && session.retry_writes? && (write_concern.nil? || write_concern.acknowledged?) end
So session is here only a boolean and not a session object somehow. I could not find any infos concerning upgrade changes so i consider this as a bug?