-1

我是 Arch Linux 用户已有几年了,我喜欢使用 pacman-notifier 来让我及时更新我的​​盒子。

几周前 pacman-notifier 停止为我工作,并显示以下消息:

$ pacman-notifier
/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:110:in `require': cannot load such file -- RNotify (LoadError)
from /usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:110:in `rescue in require'
from /usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:35:in `require'
from /usr/lib/ruby/site_ruby/2.0.0/pacman_notifier/gui/gtk.rb:2:in `<top (required)>'
from /usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
from /usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
from /usr/lib/ruby/site_ruby/2.0.0/pacman_notifier.rb:6:in `<top (required)>'
from /usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
from /usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
from /usr/bin/pacman-notifier:3:in `<main>'

首先我认为 RNotify 包不在正确的位置,所以我搜索它:

$ locate rnotify
/opt/kde/include/kdirnotify.h
/opt/kde/include/kdirnotify_stub.h
/usr/lib/ruby/gems/2.0.0/gems/ruby-libnotify-0.5.1/doc/ext/rnotify_c.html
/usr/lib/ruby/gems/2.0.0/gems/ruby-libnotify-0.5.1/ext/rnotify.c
/usr/lib/ruby/gems/2.0.0/gems/ruby-libnotify-0.5.1/ext/rnotify.o
/usr/lib/ruby/gems/2.0.0/gems/ruby-libnotify-0.5.1/ext/rnotify.so
/usr/lib/ruby/gems/2.0.0/gems/ruby-libnotify-0.5.1/lib/rnotify.so

但我认为我得到的输出是正确的。

我还尝试检查提到的/usr/lib/ruby/site_ruby/2.0.0/pacman_notifier/gui/gtk.rb内容,但由于我真的不知道要搜索什么,所以我放弃了。

谁能给我一个提示来解决我的问题?

4

1 回答 1

1

我的猜测是 ruby​​-libnotify 不支持 Ruby 2。这可能不是您想要的答案,但您可以查看libnotify gem。在我看来,它非常相似,但维护得更积极,它支持 Ruby 2。

于 2013-04-19T20:11:38.007 回答