Gem dependencies versions meaning

后端 未结 1 1760
误落风尘
误落风尘 2021-02-02 13:35

Gem dependency version can be specified with prefixes =, <, >, <=, >= and ~>. I unde

相关标签:
1条回答
  • 2021-02-02 14:20

    The ~> operator means: match within the same version, depending on how specific you want it to be, here's some examples:

     Specification From  ... To (exclusive)
      ">= 3.0"      3.0   ... &infin;
      "~> 3.0"      3.0   ... 4.0
      "~> 3.0.0"    3.0.0 ... 3.1
      "~> 3.5"      3.5   ... 4.0
      "~> 3.5.0"    3.5.0 ... 3.6
    

    Source

    0 讨论(0)
提交回复
热议问题