Bundler could not find compatible versions for gem "activemodel"

Trying to install mongoid 3.1.6 on rails 4.1

Bundler could not find compatible versions for gem "activemodel": In the Gemfile:

mongoid (~> 3.1.6) ruby depends on
  activemodel (~> 3.2) ruby

rails (= 4.1.0) ruby depends on
  activerecord (= 4.1.0) ruby depends on
    activemodel (4.1.0)

It works fine when mongoid is downgraded to 1.0.6, but I need to use mongoid 3.1.6 in 4.1 rails. Is there a solution to solve this problem?

+4
source share
1 answer

You will need the mongoid version 4.x version that uses activemodel >= 4.0.0. Here's the last one:

gem 'mongoid', '~> 4.0.0'
+10
source

Source: https://habr.com/ru/post/1536166/


All Articles