As Mongoid latest version 7.2.1 has quite a few issues of saving , updating and also the validation errors. With Rails 6.1.3 and Ruby 3.0.0.
What is the previous stable version of mongoid other than 7.2.1 Which do not have any such issues as 7.2.1.
Until this work is done we recommend using a 2.x version of Ruby along with the latest driver and ODM compatible with your version of MongoDB.
The main error that comes is through the translate method from the MongoidError class which i did a work around with a monkey patch
def translate(key, options)
As ruby 3 doesnt accept options directly as the arguments cannot be send as a hash we need to spread it to make it work.