26
20

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【解決】You must use Bundler 2 or greater with this lockfile.

Last updated at Posted at 2019-05-21

You must use Bundler 2 or greater with this lockfile.が出た場合の対策。You must use Bundler 2 or greater with this lockfile.が出る原因はbundle installされているgemとそれを管理するbundlerのバージョンが違うことで起こっているみたい

解決策

以降でやりたいことは、 「bunderとインストールするgemのバージョンを合わせるということ」

Gemfile.lockを削除

$ rm Gemfile.lock

アプリ本体にインストールされているgemも念の為削除

$ rm -rf vendor/bundle

バージョン2以上のbundlerをインストール

$ gem install bundler -v '2.2.17'
$ bundle install

bundlerを旧バージョンに合わせる方法

$ gem install bundler -v 2.2.17
$ rm -rf Gemfile.lock
$ bundle _2.2.17_ install

以上です!
https://stackoverflow.com/questions/53231667/bundler-you-must-use-bundler-2-or-greater-with-this-lockfile/67632652#67632652
https://qiita.com/tanakaworld/items/e15ff9dbdd4b628378c2
https://matoyomi.hatenablog.com/entry/20200106/1578254682
https://qiita.com/yoshijbbsk1121/items/87250501b32c6433943e
https://stackoverflow.com/questions/53231667/bundler-you-must-use-bundler-2-or-greater-with-this-lockfile/57125886

26
20
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
26
20

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?