我在Ubuntu服务器上运行rails应用程序时出现以下错误

致命:侦听错误:无法监视目录的更改.参观

我遵循了上面的GitHub页面,但我无法在设置为8192的max_user_watches中写入,我想将其设置为524288.

提前感谢!!!

推荐答案

https://github.com/guard/listen/blob/master/README.md#increasing-the-amount-of-inotify-watchers 0太小了,请try 使用524288,如wiki页面中所述:https://github.com/guard/listen/blob/master/README.md#increasing-the-amount-of-inotify-watchers

Listen默认情况下在Linux上使用inotify来监视

如果您运行的是Debian、RedHat或其他类似的Linux

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

If you are running ArchLinux, run the following comm和 instead

echo fs.inotify.max_user_watches=524288 | sudo tee /etc/sysctl.d/40-max-user-watches.conf && sudo sysctl --system

Ruby-on-rails相关问答推荐

GO AES GCM加密在解密时出错&S

只允许用户在 Rails 中输入字母和数字

错误 NoMethodError:ActionView::Base:Class 的未定义方法 `debug_rjs='

有没有一种简单的方法可以让 pow 为 https 服务?

Rails - 按连接表数据排序

未初始化的常量 ActionDispatch::Session::EncryptedCookieStore (NameError)

如何获取 Ruby on Rails 生成的表单元素 id 以供 JavaScript 参考?

从 ActiveRecord 模型的集合中构建哈希

水豚 click_link 与 :href 匹配

在 Rails/ActiveRecord 列名中使用问号字符

Rails:在 lib 目录中记录代码?

如何将自定义路由添加到资源路由

如何在特定时区(最好是我的应用程序的默认时区,而不是 UTC)中创建新的 DateTime 对象?

Rails:将所有未知路由重定向到 root_url

Rails - 具有空数组的强参数

如何在 ROR (Ruby) 中显示 PDF?

使用 rvm 更新 ruby​​ 版本后收到警告消息Path set to RVM

rake db:回滚不起作用?

Ruby on Rails:如何从显示的子资源中获取错误消息?

Rails 3:乘客找不到Bundle 程序安装的 git gem