使用活动管理员,polyamorous,activerecord更新squeel问题

时间:2016-08-02 17:31:54

标签: ruby-on-rails ruby activerecord squeel

我有一个几年前的项目(轨道4),我试图更新(所有这些都是为了活跃管理员的日期时间选择不起作用) - 当我评论出需要更新时,所有更新都很好;但如果我取消注释,以至于它也会更新,我会遇到这些依赖性问题:

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

在Gemfile中:     act-as-taggable-on被解析为4.0.0,这取决于       activerecord(> = 4.0)

annotate was resolved to 2.7.1, which depends on
  activerecord (< 6.0, >= 3.2)

friendly_id (~> 5.1.0) was resolved to 5.1.0, which depends on
  activerecord (>= 4.0.0)

pg_search was resolved to 1.0.6, which depends on
  activerecord (>= 3.1)

polyamorous was resolved to 1.3.1, which depends on
  activerecord (>= 3.0)

polyamorous was resolved to 1.3.1, which depends on
  activerecord (>= 3.0)

rails (~> 4.2.1) was resolved to 4.2.1, which depends on
  activerecord (= 4.2.1)

rails-erd was resolved to 1.4.7, which depends on
  activerecord (>= 3.2)

random_record was resolved to 0.0.8, which depends on
  activerecord (>= 3.0.0)

squeel was resolved to 0.5.0, which depends on
  activerecord (~> 3.1.0.alpha)

Bundler找不到gem&#34; polyamorous&#34;的兼容版本:   在Gemfile中:     polyamorous

ransack was resolved to 1.8.1, which depends on
  polyamorous (~> 1.3)

squeel was resolved to 0.8.10, which depends on
  polyamorous (~> 0.5.0)

Bundler无法找到gem&#34; sass&#34;的兼容版本:   在Gemfile中:     bootstrap-sass(〜> 3.1.1)被解析为3.1.1.1,这取决于       sass(〜> 3.2)

activeadmin was resolved to 1.0.0.pre4, which depends on
  bourbon was resolved to 4.0.0, which depends on
    sass (~> 3.3)

sass-rails (~> 4.0.1) was resolved to 4.0.5, which depends on
  sass (~> 3.2.2)

我尝试过几种不同的主动管理员组合,例如:

# gem 'activeadmin', '~> 1.0.0.pre2'
# gem 'activeadmin', github: 'activeadmin'
gem 'activeadmin', github: 'gregbell/active_admin'

# gem 'ransack',             github: 'ernie/ransack'
gem 'inherited_resources', github: 'josevalim/inherited_resources'
gem 'formtastic',          github: 'justinfrench/formtastic'
gem 'chosen-rails'
gem 'select2-rails'
gem 'active_admin_datetimepicker'
gem "active_admin-sortable_tree"
gem 'polyamorous', github: 'activerecord-hackery/polyamorous'
gem 'ransack', github: 'activerecord-hackery/ransack'

# gem "squeel"  # Last officially released gem
# gem 'squeel', github: 'activerecord-hackery/squeel'
# gem "squeel", :git => "git://github.com/ernie/squeel.git" # Track git repo

但似乎没有任何工作......

1 个答案:

答案 0 :(得分:0)

虽然我仍在使用它(Rails 5升级),但您可能需要尝试明确地将activeresource添加到Gemfile。像这样:

gem 'activeresource', github: 'rails/activeresource'

gem 'activeadmin', github: 'activeadmin'
gem 'devise', '~> 3.4.1'

此更新确实对我有用,至少到目前为止,并且没有使用其他依赖项,例如ransack,draper等,即使建议他们(ActiveAdmin&#39; s)官方README

试一试。