【问题标题】:Semantic versioning in rails: is 6.1.0.alpha considered greater than 5.2Rails 中的语义版本控制:6.1.0.alpha 被认为大于 5.2
【发布时间】:2019-09-14 06:11:27
【问题描述】:

这里有什么问题? 6.1.0.alpha 大于 5.2,所以我不知道为什么我的 bundle/build 在 travis ci 上失败。

Bundler could not find compatible versions for gem "activemodel":
  In Gemfile:
    rails was resolved to 6.1.0.alpha, which depends on
      activemodel (= 6.1.0.alpha)
    web-console was resolved to 3.7.0, which depends on
      activemodel (>= 5.2)

【问题讨论】:

  • 我回答了一个类似的问题,stackoverflow.com/questions/55813658/…你能分享你的 Gemfile 吗?
  • 这是唯一的错误吗? Bundler 倾向于输出它无法匹配版本的 gem 的所有版本要求,即使是那些满足的版本。

标签: ruby-on-rails semantic-versioning


【解决方案1】:

你可以这样检查:

Gem::Version.new('6.1.0.alpha') >= Gem::Version.new('5.2') # => true
Gem::Requirement.new(">= 5.2").satisfied_by?(Gem::Version.new('6.1.0.alpha')) # => true

Bundler 倾向于输出它无法匹配版本的 gem 的所有版本要求,即使是那些满足的版本,很可能还有另一个 gem 具有不匹配的要求。

【讨论】:

    猜你喜欢
    • 2017-06-01
    • 2018-08-08
    • 2016-04-17
    • 2015-03-10
    • 2020-03-27
    • 2015-10-28
    • 2020-02-17
    • 2018-02-03
    • 2017-04-16
    相关资源
    最近更新 更多