环境
uname -a主干Linux联想-Z50-704.2.0-27-通用#32-Ubuntu 1月22日04:49:08 UTC 2016 x86_64 GNU/Linux
lsb_release -a中继➜没有LSB模块可用。发行商ID: Ubuntu描述:Ubuntu15.10发行版: 15.10代码:狡猾相关信息:
预期行为
rails c应该启动rails控制台
实际行为
例外: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发布于 2016-03-24 14:04:44
Hpricot已经很多年没有更新了,并且似乎正在使用我们在JRuby 1.7或JRuby 9k中删除的API。它将需要更新和重新发布,否则您将需要使用其他东西。
https://stackoverflow.com/questions/36194805
复制相似问题