如何“要求”手动安装gems(KDE plasmoid)?
我正在尝试为 KDE 编写 Ruby 等离子体。我只需要使用一颗红宝石。每当我写 require 'dbus'
时,它都会抛出一个错误:
code/main.rb:6:in 'require': no such file to load -- dbus (LoadError) 代码/main.rb:6:在“<模块:TestApp>”中 code/main.rb:5:in '<顶部(必需)>' /usr/share/apps/plasma_scriptengine_ruby/applet.rb:177:在“加载”中 /usr/share/apps/plasma_scriptengine_ruby/applet.rb:177:在“init”中 /usr/share/apps/plasma_scriptengine_ruby/applet.rb:201:in 'constraintsEvent': 未定义方法 'constraintsEvent' for nil:NilClass (NoMethodError) /usr/share/apps/plasma_scriptengine_ruby/applet.rb:201:in 'constraintsEvent': undefined method 'constraintsEvent' for nil:NilClass (NoMethodError)
实际上,普通的“ruby main.rb”效果很好(关于“要求”部分),但使用“plasmoidviewer”测试等离子体失败。请注意,标准 Ruby 安装中的常规 gem 运行良好,即 require 'Qt4'
或 require 'yaml'
可以完美加载。我在 Linux 下使用 Ruby 1.9.2p180。
09:40 PM - 更新: Richard Dale,QtRuby 开发人员之一,几分钟前刚刚解决了这个问题。 KDE 的下一个版本将包含 QtRuby 的修补版本。
I'm trying to write a Ruby plasmoid for KDE. I need to use barely one rubygem. Whenever I write require 'dbus'
, it throw me and an error:
code/main.rb:6:in 'require': no such file to load -- dbus (LoadError)
code/main.rb:6:in '<module:TestApp>'
code/main.rb:5:in '<top (required)>'
/usr/share/apps/plasma_scriptengine_ruby/applet.rb:177:in 'load'
/usr/share/apps/plasma_scriptengine_ruby/applet.rb:177:in 'init'
/usr/share/apps/plasma_scriptengine_ruby/applet.rb:201:in 'constraintsEvent': undefined method 'constraintsEvent' for nil:NilClass (NoMethodError)
/usr/share/apps/plasma_scriptengine_ruby/applet.rb:201:in 'constraintsEvent': undefined method 'constraintsEvent' for nil:NilClass (NoMethodError)
Actually, normal "ruby main.rb" works well (regarding on "require" part), but testing plasmoid with "plasmoidviewer" fails. Note, that regular gems from standart Ruby installation works well, i.e. require 'Qt4'
or require 'yaml'
loads perfectly. I'm using Ruby 1.9.2p180 under Linux.
09:40 PM - UPDATE: Richard Dale, one of the QtRuby developers, just fixed this issue a few minutes ago. Next release of KDE will have patched version of QtRuby.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
之后你可以做
and after that you can do
你试过这个吗:
?
Have you tried this:
?