railsコマンドを入力するたびに警告が出ていたのを放置していたので、対処してみた。
下記の警告のメッセージを丸々コピペしてググる。
"the running version of Bundler (2.1.2) is older than the version that created the lockfile (2.1.4). We suggest you to upgrade to the version that created the lockfile by running"
Bundler が Ruby 2.7 で変な件が検索結果に出た。
唯一の日本語記事なので、まずこれを参考にしてみた。
記事にある事象と自分の環境を比較してみる。
$ bundle -v
Bundler version 2.1.4
$ gem list bundler
*** LOCAL GEMS ***
bundler (2.1.4, default: 2.1.2)
p Bundler::VERSION
"2.1.2"
$ gem update --system 3.0.8 && gem update --system
対処したことで警告は出なくなったが、
バージョンの表示はこれで良いのか?
p Bundler::VERSION
"2.1.2"
$ gem list bundler
*** LOCAL GEMS ***
bundler (default: 2.1.4)
$ bundle check
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.
The Gemfile's dependencies are satisfied
参照:bundle installする際のtzinfo-dataのwarningがウザい
「UnixベースのOSではtzinfoからシステムのタイムゾーン情報に直接アクセスできるので、このgemを入れる必要はないそう。」という言葉を鵜呑みにするなら、下記の行をコメントアウトするのみ。
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
期待通りエラーは出なくなった。