Home Articles

RAILS:Bundler在安装ActiveAdmin时找不到gem“actionpack”的兼容版本

Asked
Viewed 1981 times
5

我在我的gemfile中添加了 gem 'activeadmin', github: 'activeadmin' 并进行了一个bundle安装 . 然后它给我发了以下错误 .

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)

运行捆绑包更新将仅使用Gemfile中的gem来从头开始重建快照,这可以解决冲突 .

我做了捆绑更新,但仍然是错误相同 . 任何帮助,将不胜感激 .

EDIT

gem'activeadmin'与rails 5不兼容

2 Answers

  • 5

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

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

    要进一步阅读,请转到this thread .

  • 1

    您必须在rails 5中使用活动管理员安装继承的资源gem

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

Related