LoginSignup
1
1

More than 3 years have passed since last update.

【Ruby on rails】rails db:migrate:resetコマンドでFATAL: Listen error: unable to monitor directories for changes.と表示される。【Rails tutorial】

Posted at

エラーについて

以下コマンド実行時にエラーが発生。

rails db:migrate:reset
FATAL: Listen error: unable to monitor directories for changes.
Visit https://github.com/guard/listen/wiki/Increasing-the-amount-of-inotify-watchers for info on how to fix this.

対処法

調べてみると、inotifyのインスタンス上限を変更することで対処可能なようです。
catで以下ファイルについて確認。

cat /proc/sys/fs/inotify/max_user_instances 
128

128から524288に変更していきます。
設定ファイルに追記します。

echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf

fs.inotify.max_user_watches=524288

追記したファイルを反映します。

sudo sysctl -p

再びエラーだったコマンドを実行。

rails db:migrate:reset

無事にコマンドが通りました!

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