Comparability Issue rails 4 beta, ruby 2.0.0, mongoid

时光怂恿深爱的人放手 提交于 2019-12-03 08:14:35

问题


I am creating a test application using following versions of rails, ruby and mongoid.

rails 4 beta
ruby 2.0.0
mongoid 3.1.2

My GemFile looks like this

gem 'rails', '4.0.0.beta1'
ruby '2.0.0'
gem 'mongoid', '~> 3.1.2'
gem 'bson_ext'

But when i run bundle on console I get following error.

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

Fetching gem metadata from https://rubygems.org/...........
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Bundler could not find compatible versions for gem "activemodel":
  In Gemfile:
    mongoid (~> 3.1.2) ruby depends on
      activemodel (~> 3.2) ruby

    rails (= 4.0.0.beta1) ruby depends on
      activemodel (4.0.0.beta1)

Can anyone help? Please.....


回答1:


Use mongoid master from github, that has support for rails 4.0.

gem 'mongoid', git: 'https://github.com/mongoid/mongoid.git'


来源:https://stackoverflow.com/questions/15512683/comparability-issue-rails-4-beta-ruby-2-0-0-mongoid

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!