エラー発生前の操作や設定など
bundle install
した。
エラー内容
You have requested: listen >= 3.0.5, < 3.2 The bundle currently has listen locked at 3.2.1. Try running `bundle update listen` If you are updating multiple gems in your Gemfile at once, try passing them all to `bundle update`
参考サイト
bundle install と bundle updateの違いについて
↑
ありがとうございます!bundleのこと、しっかり理解できました。
簡潔で分かりやすかったです☺️
原因
Gemfileで設定したバージョンより、カレントのlistenのバージョンが新しかった。
作業環境
$ sw_vers ProductName: Mac OS X ProductVersion: 10.15.4
ruby 2.6.2p47 Rails 6.0.3
Gemfileの内容(抜粋)
group :development do # Access an interactive console on exception pages or by calling 'console' anywhere in the code. gem 'web-console', '>= 3.3.0' gem 'listen', '>= 3.0.5', '< 3.2' # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring gem 'spring' gem 'spring-watcher-listen', '~> 2.0.0' end
解決手順
カレントのlisten
が3.2.1.
だから、Gemの記述に合わせるために
bundleをupdateする。
1.bundle update
$ bundle update Fetching gem metadata from https://rubygems.org/............ Fetching gem metadata from https://rubygems.org/. ...(省略)... Bundle updated! Gems in the group production were not updated.
↓↓実行後のGemfile.lock
は、こちら(抜粋)↓
...(省略)... listen (3.1.5) rb-fsevent (~> 0.9, >= 0.9.4) rb-inotify (~> 0.9, >= 0.9.7) ruby_dep (~> 1.2) ...(省略)...