bundle update rails上的不兼容依赖项

hof1towb  于 2021-09-29  发布在  Java
关注(0)|答案(1)|浏览(291)

我正在尝试从rails 5.1.5升级到5.2.0,但是我遇到了一些依赖性问题,这些问题看起来应该可以解决,例如:

Bundler could not find compatible versions for gem "actionmailer":  
In Gemfile:
exception_notification was resolved to 4.4.0, which depends on
  actionmailer (>= 4.0, < 7)

rails (= 5.2.0) was resolved to 5.2.0, which depends on
  actionmailer (= 5.2.0)

simple_token_authentication (~> 1.0) was resolved to 1.15.1, which depends on
  actionmailer (>= 3.2.6, < 6)

但从我的理解来看(我非常肯定这可能是错的)。事实上,这些都应该是兼容的。ActionMailer版本也将是5.2.0,适合于

>= 4.0, < 7
= 5.2.0
>= 3.2.6, < 6

希望我错过了一些简单的东西。先谢谢你。
编辑以包含完整的错误消息:

Bundler could not find compatible versions for gem "actionmailer":
  In Gemfile:
    exception_notification was resolved to 4.4.0, which depends on
      actionmailer (>= 4.0, < 7)

    rails (= 5.2.0) was resolved to 5.2.0, which depends on
      actionmailer (= 5.2.0)

    simple_token_authentication (~> 1.0) was resolved to 1.15.1, which depends on
      actionmailer (>= 3.2.6, < 6)

Bundler could not find compatible versions for gem "activemodel":
  In Gemfile:
    draper was resolved to 3.0.1, which depends on
      activemodel-serializers-xml (~> 1.0) was resolved to 1.0.2, which depends on
        activemodel (> 5.x)

    draper was resolved to 3.0.1, which depends on
      activemodel (~> 5.0)

    paperclip (~> 5.0.0) was resolved to 5.0.0, which depends on
      activemodel (>= 4.2.0)

    rails (= 5.2.0) was resolved to 5.2.0, which depends on
      activemodel (= 5.2.0)

    searchkick was resolved to 2.4.0, which depends on
      activemodel (>= 4.1)

    valid_email was resolved to 0.1.0, which depends on
      activemodel

    web-console was resolved to 3.5.1, which depends on
      activemodel (>= 5.0)

Bundler could not find compatible versions for gem "activerecord":
  In Gemfile:
    active_record_slave was resolved to 1.5.0, which depends on
      activerecord (>= 3.0)

    activerecord-import was resolved to 0.24.0, which depends on
      activerecord (>= 3.2)

    activerecord-nulldb-adapter was resolved to 0.4.0, which depends on
      activerecord (>= 2.0.0)

    annotate was resolved to 2.7.5, which depends on
      activerecord (>= 3.2, < 7.0)

    deep_cloneable (~> 2.2.2) was resolved to 2.2.2, which depends on
      activerecord (>= 3.1.0, < 5.2.0)

    oink was resolved to 0.10.1, which depends on
      activerecord

    pghero was resolved to 2.3.0, which depends on
      activerecord (>= 5)

    rails (= 5.2.0) was resolved to 5.2.0, which depends on
      activerecord (= 5.2.0)

    with_advisory_lock was resolved to 4.6.0, which depends on
      activerecord (>= 4.2)

Bundler could not find compatible versions for gem "rack":
  In Gemfile:
    rack (= 2.1.2)

    better_errors was resolved to 2.4.0, which depends on
      rack (>= 0.9.0)

    capybara-webkit was resolved to 1.15.1, which depends on
      capybara (>= 2.3, < 4.0) was resolved to 2.18.0, which depends on
        rack (>= 1.0.0)

    omniauth-salesforce was resolved to 1.0.5, which depends on
      omniauth-oauth2 (~> 1.0) was resolved to 1.5.0, which depends on
        oauth2 (~> 1.1) was resolved to 1.4.0, which depends on
          rack (>= 1.2, < 3)

    omniauth-salesforce was resolved to 1.0.5, which depends on
      omniauth (~> 1.0) was resolved to 1.8.1, which depends on
        rack (>= 1.6.2, < 3)

    omniauth-twitter was resolved to 1.4.0, which depends on
      rack

    turnout was resolved to 2.4.1, which depends on
      rack-accept (~> 0.4) was resolved to 0.4.5, which depends on
        rack (>= 0.4)

    rack-mini-profiler was resolved to 2.0.2, which depends on
      rack (>= 1.2.0)

    draper was resolved to 3.0.1, which depends on
      request_store (~> 1.0) was resolved to 1.4.0, which depends on
        rack (>= 1.4)

    sidekiq (= 6.0.6) was resolved to 6.0.6, which depends on
      rack (~> 2.0)

    turnout was resolved to 2.4.1, which depends on
      rack (>= 1.3, < 3)

Bundler could not find compatible versions for gem "rails":
  In Gemfile:
    rails (= 5.2.0)

    human_attribute_values was resolved to 1.0.1, which depends on
      rails (>= 4.1.8, < 6.0)

    minitest-spec-rails was resolved to 5.4.0, which depends on
      rails (>= 4.1)

    nested_form_fields was resolved to 0.8.2, which depends on
      rails (>= 3.2.0)

    spinjs-rails (~> 1.4) was resolved to 1.4, which depends on
      rails (>= 3.1)
uhry853o

uhry853o1#

这是错误消息中的关键行:

deep_cloneable (~> 2.2.2) was resolved to 2.2.2, which depends on
  activerecord (>= 3.1.0, < 5.2.0)

那么,这个版本的 deep_cloneable 与rails不兼容 5.2.0 .
看着 rubygems.org 或者变更日志,您可以看到支持是在版本中添加的 2.3.2 . 因此,要使用rails 5.2,您至少需要更新到这个版本,或者删除依赖项。

相关问题