我是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
但是我真的不知道要搜索什么我放弃了。
有人可以给我一些解决我问题的提示吗?
答案 0 :(得分:1)
我的猜测是ruby-libnotify不支持Ruby 2.这可能不是您想要的答案,但您可以查看libnotify gem 。在我看来,它非常相似,但更积极地维护,它支持Ruby 2.