【发布时间】:2018-10-26 22:57:05
【问题描述】:
尝试将 Rails 4.2.9 应用更新到 Rails 5.2.1。更改了 Gemfile:
gem 'rails', '5.2.1'
但 Bundler 似乎无法找到合适的 ActiveModel 版本(在 Gemfile 中的任何地方都没有明确指出)。
我已将下面提到的 gem 更新到它们的最新版本(active_model_serializers、clearance、simple_form、sanitize 和 capybara-angular(到 0.2.5,因为 0.2.6 违反了规范)和测试通过 4.2.9)。
不知道如何解决这个问题。想法?
$ bundle update rails
...
Bundler could not find compatible versions for gem "activemodel":
In Gemfile:
active_model_serializers (= 0.10.7) was resolved to 0.10.7, which depends on
activemodel (< 6, >= 4.1)
clearance (= 1.16.1) was resolved to 1.16.1, which depends on
email_validator (~> 1.4) was resolved to 1.6.0, which depends on
activemodel
rails (= 5.2.1) was resolved to 5.2.1, which depends on
activemodel (= 5.2.1)
simple_form (= 3.5.1) was resolved to 3.5.1, which depends on
activemodel (< 5.2, > 4)
Bundler could not find compatible versions for gem "nokogiri":
In Gemfile:
nokogiri (= 1.7.2)
capybara-angular (= 0.2.5) was resolved to 0.2.5, which depends on
capybara (>= 2.5.0) was resolved to 2.18.0, which depends on
nokogiri (>= 1.3.3)
sanitize (= 4.6.6) was resolved to 4.6.6, which depends on
nokogumbo (~> 1.4) was resolved to 1.5.0, which depends on
nokogiri
sanitize (= 4.6.6) was resolved to 4.6.6, which depends on
nokogiri (>= 1.4.4)
capybara-angular (= 0.2.5) was resolved to 0.2.5, which depends on
capybara (>= 2.5.0) was resolved to 2.18.0, which depends on
xpath (< 4.0, >= 2.0) was resolved to 2.1.0, which depends on
【问题讨论】:
-
您是否尝试使用
gem pristine --all获取您的 gemset 的新副本? -
simple_form 需要低于 5.2 的版本,而 rails 需要 5.2.1 的版本,查看 simple_form 文档,也许您需要同时更新 rails 和 simple_form
标签: ruby-on-rails bundler activemodel