首页 文章

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

提问于
浏览
1

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

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

在Gemfile中:acts-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“polyamorous”的兼容版本:在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“sass”的兼容版本:在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

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

    gem 'activeresource', github: 'rails/activeresource'
    
    gem 'activeadmin', github: 'activeadmin'
    gem 'devise', '~> 3.4.1'
    

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

    试试看 .

相关问题