Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails 6 + Mongoid 6.1.0 not compatible versions for gem "activemodel"

Trying to use Rails 6.0.0 with Mongoid 6.1.0

gem 'rails', '~> 6.0.0' gem 'mongoid', '~> 6.1.0'

Tried already to not set the mongoid version in Gemfile, but still not working.

Bundler could not find compatible versions for gem "activemodel":

In Gemfile:

mongoid (~> 6.1.0) was resolved to 6.1.1, which depends on activemodel (~> 5.0

rails (~> 6.0.0) was resolved to 6.0.0, which depends on activemodel (= 6.0.0)

like image 811
pipinha Avatar asked Dec 15 '25 18:12

pipinha


1 Answers

I´ve just found a simple way to fix this until mongoid release the latest version that is compatible

Replace the mongoid gem to:

gem 'mongoid', git: 'https://github.com/mongodb/mongoid.git', branch: 'master'

Than

bundle update

like image 56
pipinha Avatar answered Dec 19 '25 05:12

pipinha



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!