【问题标题】:After update to rails 5.1 gives error on gem "activemodel"更新到 rails 5.1 后,gem "activemodel" 出现错误
【发布时间】:2017-05-09 07:28:07
【问题描述】:

从 4.2.8 更新到 rails 5.1 后,运行 'bundle update' 时出错。

Bundler could not find compatible versions for gem "activemodel":
  In Gemfile:
    protected_attributes (~> 1.1.4) was resolved to 1.1.4, which depends on
      activemodel (< 5.0, >= 4.0.1)

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

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

protected_attributes gem 似乎与 rails 5.1 版本不兼容。有没有办法在不删除 protected_attributes gem 的情况下解决这个问题?

【问题讨论】:

  • 如果你去他们的 github 页面,上面写着Note: This plugin will be officially supported until the release of Rails 5.0.
  • 如果你在跟我说话,我并没有对你投反对票。

标签: ruby-on-rails rubygems


【解决方案1】:

正如项目的自述文件所述:

该插件将在 Rails 5.0 发布之前得到正式支持

因此,要么维护自己的分支以保持与 Rails 5.0 及更高版本的兼容性,要么硬着头皮接受强大的参数。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2023-03-04
    • 1970-01-01
    • 1970-01-01
    • 2018-08-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多