【问题标题】:Getting rb-inotify error "Errno::ENOSYS" with compass and susy plugin使用指南针和 susy 插件获取 rb-inotify 错误“Errno::ENOSYS”
【发布时间】:2011-07-26 07:00:36
【问题描述】:

我安装了 Compass gem (compass-0.11.beta.2) 以及 Compass susy 插件。每次我运行“指南针手表”时,我都会收到错误消息:
"Errno::ENOSYS 在 /path/to/rb-inotify/notifier.rb 的第 ["60"] 行:初始化 inotify"
这是错误引用的notifier.rb 中的代码块

def initialize
@fd = Native.inotify_init
  @watchers = {}
  return unless @fd < 0

  raise SystemCallError.new(
    "Failed to initialize inotify" +
    case FFI.errno
    when Errno::EMFILE::Errno; ": the user limit on the total number of inotify instances has been reached."
    when Errno::ENFILE::Errno; ": the system limit on the total number of file descriptors has been reached."
    when Errno::ENOMEM::Errno; ": insufficient kernel memory is available."
    else; ""
    end,
This is line ["60"] ===>  FFI.errno)
end

我尝试重新安装所有涉及的 gem,以及每个 gem 的 3-4 个不同版本,但每次我仍然遇到相同的错误。谁能帮我一把?

【问题讨论】:

    标签: ruby compass-sass sass


    【解决方案1】:

    您需要升级系统。

    inotify_init(2) 的底层调用返回的是 ENOSYS,这意味着该功能未在您系统的 libc 中实现,甚至可能在内核中不支持。

    (例如,一些旧版本的 Fedora Linux 似乎支持内核中的 inotify 工具,但没有发布公开该功能的 glibc。)

    【讨论】:

    • @werm,您能否通过命令行实用程序验证 inotify 是否在您的系统上运行?
    • 它在服务器上的所有其他 Compass 安装中都可以正常工作,但无论出于何种原因都不是那个。还没弄清楚原因。
    猜你喜欢
    • 2013-03-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-03-27
    • 1970-01-01
    • 2014-07-29
    • 1970-01-01
    相关资源
    最近更新 更多