我有一个几年前的项目(rails 4),我正试图更新它(这一切都是为了让活动管理员的datetime选择不起作用) --当我注释掉需要更新的squeel时,它所有的更新都很好;但是如果我取消了squeel的注释,那么它也会更新,我会得到以下依赖问题:
Bundler could not find compatible versions for gem "activerecord":
在Gemfile中:acts as-taggable- on被解析为4.0.0,这取决于活动记录(>= 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中:引导程序-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
但似乎什么都不起作用……
发布于 2016-08-04 14:46:34
在我还在做这个工作(升级到Rails5)的时候,您可能想尝试显式地将activeresource
添加到Gemfile
中。如下所示:
gem 'activeresource', github: 'rails/activeresource'
gem 'activeadmin', github: 'activeadmin'
gem 'devise', '~> 3.4.1'
这个更新对我来说确实有效,至少到目前为止是这样,而且没有使用额外的依赖项,比如ransack,draper等等,尽管它被推荐到他们(ActiveAdmin)的官方README上。
试试看。
https://stackoverflow.com/questions/38726990
复制