【问题标题】:RAILS : Bundler could not find compatible versions for gem "actionpack" on installing ActiveAdminRAILS:Bundler 在安装 ActiveAdmin 时找不到 gem“actionpack”的兼容版本
【发布时间】:2017-04-07 08:27:53
【问题描述】:

我在我的 gemfile 中添加了 gem 'activeadmin', github: 'activeadmin' 并进行了捆绑安装。然后它向我抛出以下错误。

Bundler could not find compatible versions for gem "actionpack":
   In snapshot (Gemfile.lock):
     actionpack (= 5.0.0.1)

In Gemfile:
activeadmin (~> 1.0.0.pre4) was resolved to 1.0.0.pre4, which depends on
  formtastic (~> 3.1) was resolved to 3.1.4, which depends on
    actionpack (>= 3.2.13)

activeadmin (~> 1.0.0.pre4) was resolved to 1.0.0.pre4, which depends on
  inherited_resources (~> 1.6) was resolved to 1.6.0, which depends on
    actionpack (< 5, >= 3.2)

activeadmin (~> 1.0.0.pre4) was resolved to 1.0.0.pre4, which depends on
  inherited_resources (~> 1.6) was resolved to 1.6.0, which depends on
    actionpack (< 5, >= 3.2)

activeadmin (~> 1.0.0.pre4) was resolved to 1.0.0.pre4, which depends on
  kaminari (~> 0.15) was resolved to 0.17.0, which depends on
    actionpack (>= 3.0.0)

activeadmin (~> 1.0.0.pre4) was resolved to 1.0.0.pre4, which depends on
  ransack (~> 1.3) was resolved to 1.8.2, which depends on
    actionpack (>= 3.0)

运行 bundle update 将从头开始重建您的快照,仅使用 您的 Gemfile 中的 gem,这可能会解决冲突。

我进行了捆绑更新,但错误仍然相同。任何帮助将不胜感激。

编辑

gem 'activeadmin' 与 rails 5 不兼容

【问题讨论】:

    标签: ruby-on-rails ruby activeadmin ruby-on-rails-5


    【解决方案1】:

    这个解决方案对我有用。对于rails 5,您必须添加另一个gem,如下所示:

    gem 'activeadmin', github: 'activeadmin'
    gem 'inherited_resources', github: 'activeadmin/inherited_resources'
    

    要进一步阅读,请转到this 线程。

    【讨论】:

    • 做到了。但它与 rails 5 不兼容。这就是为什么 gem 'activeadmin', github: 'activeadmin'
    【解决方案2】:

    你必须在 Rails 5 中安装继承的资源 gem 并且有活动的管理员

    gem 'activeadmin', github: 'activeadmin'
    gem 'inherited_resources', github: 'activeadmin/inherited_resources'
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-07-10
      • 2019-03-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多