0
0

More than 1 year has passed since last update.

【Rails】Gemfileのgemバージョン指定

Posted at

初めに

Gemfileにgemを記入する際に、バージョン指定の書き方がいまいち理解できていなかったので、まとめてみました。

gem記入方

gem ライブラリ名 ,バージョン

バージョン指定

1.0.0
バージョンを固定。

>= 1.0.0
1.0.0以上のバージョンが必要。

>= 1.0.0, < 2.0.0
1.0.0以上、2.0.0未満のバージョンが必要。

~> 1.0.0
1.0.0以上で利用可能で、1.0.9などは問題なく、1.1にバージョンが上がると利用不可になる。

◆バージョン指定無しの場合は、常に最新版をインストール。

参考記事

【Rails】Gemfileのバージョン指定の書き方

0
0
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
0
0