简体   繁体   English

Jruby NoSuchMethodError:org.jruby.RubyClass.defineMethod

[英]Jruby NoSuchMethodError: org.jruby.RubyClass.defineMethod

Environment 环境

  • JRuby version : jruby 9.0.0.0 (2.2.2) 2015-07-21 e10ec96 Java HotSpot(TM) 64-Bit Server VM 25.65-b01 on 1.8.0_65-b17 +jit [linux-amd64] JRuby版本:jruby 9.0.0.0(2.2.2)2015-07-21 e10ec96 Java HotSpot(TM)64位服务器VM 25.65-b01 on 1.8.0_65-b17 + jit [linux-amd64]

  • Java version ➜ trunk java -version java version "1.8.0_65" Java(TM) SE Runtime Environment (build 1.8.0_65-b17) Java HotSpot(TM) 64-Bit Server VM (build 25.65-b01, mixed mode) Java版本➜trunk java -version Java版本“ 1.8.0_65” Java(TM)SE运行时环境(内部版本1.8.0_65-b17)Java HotSpot(TM)64位服务器VM(内部版本25.65-b01,混合模式)

  • Operating system and platform 操作系统和平台

    ➜ trunk uname -a Linux swapnil-Lenovo-Z50-70 4.2.0-27-generic #32-Ubuntu SMP Fri Jan 22 04:49:08 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux ➜trunk uname -a Linux swapnil-Lenovo-Z50-70 4.2.0-27-generic#32-Ubuntu SMP Fri Jan 22 04:49:08 UTC 2016 x86_64 x86_64 x86_64 GNU / Linux

    ➜ trunk lsb_release -a No LSB modules are available. lsb_release -a没有可用的LSB模块。 Distributor ID: Ubuntu Description: Ubuntu 15.10 Release: 15.10 Codename: wily 发行者ID:Ubuntu说明:Ubuntu 15.10版本:15.10代号:wily

Relevant info: 相关信息:

Expected Behavior 预期行为

rails c should start a rails console rails c应该启动一个rails控制台

Actual Behavior 实际行为

Exception : LoadError: load error: hpricot_scan -- java.lang.NoSuchMethodError: org.jruby.RubyClass.defineMethod(Ljava/lang/String;Lorg/jruby/runtime/callback/Callback;)V 异常: LoadError: load error: hpricot_scan -- java.lang.NoSuchMethodError: org.jruby.RubyClass.defineMethod(Ljava/lang/String;Lorg/jruby/runtime/callback/Callback;)V

 ➜ trunk rails c /home/swapnil/.rvm/gems/jruby-9.0.0.0@JayApp/gems/prawn-core-0.8.4/lib/prawn/core.rb:34: warning: already initialized constant VERSION 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:940 block in require at /home/swapnil/.rvm/gems/jruby-9.0.0.0@JayApp/gems/activesupport-3.2.22.1/lib/active_support/dependencies.rb:251 load_dependency at /home/swapnil/.rvm/gems/jruby-9.0.0.0@JayApp/gems/activesupport-3.2.22.1/lib/active_support/dependencies.rb:236 require at /home/swapnil/.rvm/gems/jruby-9.0.0.0@JayApp/gems/activesupport-3.2.22.1/lib/active_support/dependencies.rb:251 <top> at /home/swapnil/.rvm/gems/jruby-9.0.0.0@JayApp/gems/hpricot-0.8.6-java/lib/hpricot.rb:20 require at org/jruby/RubyKernel.java:940 block in (root) at /home/swapnil/.rvm/gems/jruby-9.0.0.0@JayApp/gems/bundler-1.11.2/lib/bundler/runtime.rb:1 each at org/jruby/RubyArray.java:1560 block in require at /home/swapnil/.rvm/gems/jruby-9.0.0.0@JayApp/gems/bundler-1.11.2/lib/bundler/runtime.rb:77 each at org/jruby/RubyArray.java:1560 require at /home/swapnil/.rvm/gems/jruby-9.0.0.0@JayApp/gems/bundler-1.11.2/lib/bundler/runtime.rb:72 require at /home/swapnil/.rvm/gems/jruby-9.0.0.0@JayApp/gems/bundler-1.11.2/lib/bundler/runtime.rb:61 <top> at /home/swapnil/.rvm/gems/jruby-9.0.0.0@JayApp/gems/bundler-1.11.2/lib/bundler.rb:99 require at org/jruby/RubyKernel.java:940 <top> at /home/swapnil/Rails/Lab/MA-JRuby/trunk/config/application.rb:15 require at org/jruby/RubyKernel.java:940 <top> at script/rails:6 

Hpricot has not been updated in many years and appears to be using APIs we removed in either JRuby 1.7 or JRuby 9k. Hpricot多年未更新,似乎正在使用我们在JRuby 1.7或JRuby 9k中删除的API。 It will need to be updated and re-released, or you'll need to use something else. 它需要更新和重新发布,或者您需要使用其他东西。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM