An error occurred when executing the following command.
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.
After investigating, it seems that it can be dealt with by changing the instance limit of inotify. Check the following files with cat.
cat /proc/sys/fs/inotify/max_user_instances
128
We will change from 128 to 524288. Add to the configuration file.
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf
fs.inotify.max_user_watches=524288
Reflects the added file.
sudo sysctl -p
Execute the command that was in error again.
rails db:migrate:reset
The command passed successfully!
Recommended Posts