【发布时间】:2023-03-04 15:43:02
【问题描述】:
当我尝试在我的服务器上运行 rails c production 时出现以下错误。
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.
我可以在这里使用公认的解决方案来修复它:Listen error: unable to monitor directories for changes
但是,我想知道为什么会这样。什么会导致此错误? inotify 监控哪些文件?可以通过取消监控文件来解决吗?提高可监控文件的限制似乎不是一个很好的解决方案。
来自链接问题中的解决方案:“Listen 在 Linux 上默认使用 inotify 来监控目录的更改。遇到系统限制您可以监控的文件数量的情况并不少见。”
【问题讨论】:
-
您的 Rails 文件是否位于通过网络安装的文件夹中?当我通过
sshfs在服务器上编辑文件时,RubyMine 给了我类似的警告。
标签: ruby-on-rails ubuntu inotify