簡體   English   中英

RoR - Bundler 找不到 gem 的兼容版本

[英]RoR - Bundler could not find compatible versions for gem

我正在研究 Ruby on Rails 應用程序。 我正在嘗試將 rails 版本從 4.2 升級到 5.0

我已經更改了引擎 gemspec 文件中的 rails 依賴項。

在引擎中運行bundle update時,它顯示以下錯誤 -

Bundler could not find compatible versions for gem "actionmailer":
  In Gemfile:
    engine was resolved to 0.0.1, which depends on
      rails (~> 5.0) was resolved to 5.2.4.4, which depends on
        actionmailer (= 5.2.4.4)

    simple_token_authentication was resolved to 1.17.0, which depends on
      actionmailer (>= 3.2.6, < 7)

Bundler could not find compatible versions for gem "actionpack":
  In Gemfile:
    engine was resolved to 0.0.1, which depends on
      rails (~> 5.0) was resolved to 5.2.4.4, which depends on
        actionpack (= 5.2.4.4)

    rspec-rails was resolved to 4.0.2, which depends on
      actionpack (>= 4.2)

    simple_token_authentication was resolved to 1.17.0, which depends on
      actionpack (>= 3.2.6, < 7)

Bundler could not find compatible versions for gem "activerecord":
  In Gemfile:
    paranoia (~> 2.2) was resolved to 2.4.3, which depends on
      activerecord (>= 4.0, < 6.2)

    engine was resolved to 0.0.1, which depends on
      rails (~> 5.0) was resolved to 5.2.4.4, which depends on
        activerecord (= 5.2.4.4)

Bundler could not find compatible versions for gem "activesupport":
  In Gemfile:
    factory_girl_rails was resolved to 4.9.0, which depends on
      factory_girl (~> 4.9.0) was resolved to 4.9.0, which depends on
        activesupport (>= 3.0.0)

    engine was resolved to 0.0.1, which depends on
      rails (~> 5.0) was resolved to 5.2.4.4, which depends on
        activesupport (= 5.2.4.4)

    rspec-rails was resolved to 4.0.2, which depends on
      activesupport (>= 4.2)

Bundler could not find compatible versions for gem "rails":
  In Gemfile:
    engine was resolved to 0.0.1, which depends on
      activeadmin (= 1.0.0.pre2) was resolved to 1.0.0.pre2, which depends on
        rails (>= 3.2, < 5.0)

    engine was resolved to 0.0.1, which depends on
      rails (~> 5.0)

Bundler could not find compatible versions for gem "railties":
  In Gemfile:
    factory_girl_rails was resolved to 4.9.0, which depends on
      railties (>= 3.0.0)

    engine was resolved to 0.0.1, which depends on
      rails (~> 5.0) was resolved to 5.2.4.4, which depends on
        railties (= 5.2.4.4)

    rspec-rails was resolved to 4.0.2, which depends on
      railties (>= 4.2)

我試圖刪除引擎的 gemfile.lock 並運行命令bundle install然后它顯示以下錯誤 -

Bundler could not find compatible versions for gem "rails":
  In Gemfile:
    engine was resolved to 0.0.1, which depends on
      activeadmin (= 1.0.0.pre2) was resolved to 1.0.0.pre2, which depends on
        rails (>= 3.2, < 5.0)

    engine1 was resolved to 0.0.1, which depends on
      engine2 was resolved to 0.0.1, which depends on
        rails (~> 5.0)

有誰知道如何解決它? 請幫忙!

重新閱讀錯誤消息,它准確地說明了發生了什么。

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

沒有滿足所有要求的單一版本的 rails。 從您的問題描述中,我看到您正在嘗試更新到 5,所以讓我們看看 5 有什么問題。

In Gemfile:
  engine was resolved to 0.0.1, which depends on
    activeadmin (= 1.0.0.pre2)

引擎依賴於帶有固定版本的activeadmin

was resolved to 1.0.0.pre2, which depends on
  rails (>= 3.2, < 5.0)

此版本需要至少 3.2 且小於 5.0 的 rails。 這不允許使用 rails 5。在使用引擎更新應用程序中的 rails 之前,您需要更新引擎中的 activeadmin。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM