gpt4 book ai didi

java - Jruby NoSuchMethodError : org. jruby.RubyClass.defineMethod

转载 作者:行者123 更新时间:2023-12-01 10:09:50 28 4
gpt4 key购买 nike

环境

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

  • Java 版本➜ 主干java版本java版本“1.8.0_65”Java(TM) SE 运行时环境(版本 1.8.0_65-b17)Java HotSpot(TM) 64 位服务器 VM(内部版本 25.65-b01,混合模式)

  • 操作系统和平台

    ➜ 主干uname -aLinux swapnil-Lenovo-Z50-70 4.2.0-27-generic#32-Ubuntu SMP 1月22日星期五 04:49:08 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

    ➜ 主干lsb_release -a没有可用的 LSB 模块。发行商 ID:Ubuntu说明:Ubuntu 15.10发布时间:15.10代号:wily

相关信息:

预期行为

rails c 应该启动 Rails 控制台

实际行为

异常:LoadError:加载错误: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 已经很多年没有更新了,并且似乎正在使用我们在 JRuby 1.7 或 JRuby 9k 中删除的 API。它将需要更新并重新发布,或者您需要使用其他东西。

关于java - Jruby NoSuchMethodError : org. jruby.RubyClass.defineMethod,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36194805/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com