Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bundler could not find compatible versions for gem "activemodel"

Trying to install mongoid 3.1.6 in rails 4.1

Bundler could not find compatible versions for gem "activemodel": In 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 rails 4.1. Is there any solution to solve this problemt?

like image 511
Mothirajha Avatar asked Apr 11 '14 18:04

Mothirajha


1 Answers

You'll need to use a 4.x version of mongoid, which uses activemodel >= 4.0.0. Here's the latest:

gem 'mongoid', '~> 4.0.0'
like image 70
steakchaser Avatar answered Oct 13 '22 07:10

steakchaser