LoginSignup
1
0

More than 3 years have passed since last update.

[Rails] Could not load the 'listen' gem. Add `gem 'listen'` to the development group of your Gemfile (LoadError)

Last updated at Posted at 2019-08-22
$ rails s

しようとしたら、

.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/
activesupport-5.1.7/lib/active_support/dependencies.rb:292:in
 `require': Could not load the 'listen' gem. Add `gem 'listen'`
 to the development group of your Gemfile (LoadError)

と怒られた。

config/environments/development.rb内の

config/environments/development.rb
config.file_watcher = ActiveSupport::EventedFileUpdateChecker

をコメントアウトしたらいけた。

参考: https://www.oipapio.com/question-890966

config.file_watcher: config.reload_classes_only_on_changeがtrueの場合にファイルシステム上のファイル更新検出に使われるクラスを指定します。デフォルトのRailsではActiveSupport::FileUpdateChecker、およびActiveSupport::EventedFileUpdateChecker(これはlistenに依存します)が指定されます。カスタムクラスはこのActiveSupport::FileUpdateChecker APIに従わなければなりません。

https://railsguides.jp/configuring.html より

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