为什么Bundler找不到兼容版本,但我可以



我正在 bundle upgrade拿几个宝石,得到一些错误,我发现很奇怪:

Bundler could not find compatible versions for gem "tzinfo":
  In Gemfile:
    rails (= 5.2.3) was resolved to 5.2.3, which depends on
      activesupport (= 5.2.3) was resolved to 5.2.3, which depends on
        tzinfo (~> 1.1)
    tzinfo-data was resolved to 1.2019.2, which depends on
      tzinfo (>= 1.0.0)

Tzinfo 1.1难道不满足这一点吗?>= 1.0.0不仅是tzinfo (~> 1.1)的子集?

Bundler could not find compatible versions for gem "mongo":
  In Gemfile:
    mongo (~> 2.4.1)
    mongoid (~> 6.0) was resolved to 6.2.1, which depends on
      mongo (< 3.0.0, >= 2.4.1)

为什么Mongo 2.4.1不满足这些?

tzinfo (~> 1.1)仅等同于'> = 1.1.0,&lt;1.2.0'。因此,>= 1.0.0不是~> 1.1的子集。使用版本1.1应该有所帮助。

我看不到Mongo不应该在版本2.4.1中使用的原因,而是尝试指定精确版本:

gem 'mongo', '2.4.1'

有关Rubygem指南中~>的更多信息。

相关内容

  • 没有找到相关文章

最新更新