不能要求宝石 - 鞋子

时间:2016-12-20 05:51:50

标签: ruby rubygems shoes shoes-4

我在shoes4上运行了我的简单鞋子应用程序(我也安装了JDK和jRuby)并且我使用jruby -S gem install <gem>安装了正确的宝石,但当我require应用程序内部的宝石时并运行它,它失败了。 我已经尝试了require ruby​​gems,它本身就可以工作,但是一旦我添加了我的宝石,它就会再次失败。

我尝试使用的gem称为SimpleReq,但我很确定错误是由依赖(hpricot)引起的。 这是我的代码:

require 'rubygems'
require 'simplereq'
require 'shoes'


options = {
    title: "Shoes App",
    width: 1000
}

Shoes.app options do
  flow(width: 1000) {
    banner "Shoes"
    stack(width: "50%") {
      title "Buttons"
    }
    stack(width: "50%") {
      title "Descriptions"
    }
  }
end

这是错误:

LoadError: load error: hpricot_scan -- java.lang.NoSuchMethodError: org.jruby.RubyClass.defineMethod(Ljava/lang/String;Lorg/jruby/runtime/callback/Callback;)V
require at org/jruby/RubyKernel.java:959
require at C:/ruby/jruby/jruby-9.1.6.0/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:55
<main> at C:/ruby/jruby/jruby-9.1.6.0/lib/ruby/gems/shared/gems/hpricot-0.8.6-java/lib/hpricot.rb:20
require at org/jruby/RubyKernel.java:959
require at C:/ruby/jruby/jruby-9.1.6.0/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:55
<main> at C:/ruby/jruby/jruby-9.1.6.0/lib/ruby/gems/shared/gems/simplereq-1.0.3/lib/simplereq.rb:1
require at org/jruby/RubyKernel.java:959
(root) at C:/ruby/jruby/jruby-9.1.6.0/lib/ruby/gems/shared/gems/simplereq-1.0.3/lib/simplereq.rb:3
<main> at C:/ruby/jruby/jruby-9.1.6.0/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:1
load at org/jruby/RubyKernel.java:977
<main> at -e:1

Process finished with exit code 1

有什么建议吗?

0 个答案:

没有答案