加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ruby-on-rails – Bundler找不到gem“activemodel”的兼容版本

发布时间:2020-12-17 03:55:56 所属栏目:百科 来源:网络整理
导读:试图在rails 4.1中安装mongoid 3.1.6 Bundler找不到gem“activemodel”的兼容版本: ??在Gemfile中: mongoid (~ 3.1.6) ruby depends on activemodel (~ 3.2) rubyrails (= 4.1.0) ruby depends on activerecord (= 4.1.0) ruby depends on activemodel (4.
试图在rails 4.1中安装mongoid 3.1.6

Bundler找不到gem“activemodel”的兼容版本:
??在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)

当mongoid降级到1.0.6时它工作正常,但我需要在轨道4.1中使用mongoid 3.1.6.
有没有解决这个问题的解决方案?

解决方法

您需要使用4.x版本的mongoid,它使用activemodel> = 4.0.0.这是最新的:

gem 'mongoid','~> 4.0.0'

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读