LoginSignup
35
24

More than 5 years have passed since last update.

gem のversion指定 `~>` と `>=` の差

Last updated at Posted at 2019-03-03

~>>=、ともに後方互換性を指定する記号。

差分

~> x.x.x: versionx.x.x 以上、x.x+1.0未満

例:下記の場合、1.3.6以上、1.4.0

Gemfile.
gem 'sqlite3', '~> 1.3.6'
Gemfile.
gem 'sqlite3', '>= 1.3.6', '<1.4.0'

または

>= x.x.x:versionx.x.x以降で最新のもの

例:下記の場合、0.8.5以上の最新version、0.9.x代があれば、それらも対象になる。

Gemfile.
gem "cucumber", ">= 0.8.5"

参考

What is the difference between ~> and >= when specifying rubygem in Gemfile?

35
24
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
35
24