JRuby宝石问题

时间:2010-06-22 07:53:28

标签: ruby-on-rails ruby jruby gem

我正在尝试使用JRuby作为底层Ruby在Netbeans中运行rails应用程序。当我尝试运行服务器时,出现了这样的错误,

Missing these required gems:
  libxml-ruby  

所以我尝试安装libxml-ruby gem,但我无法安装它,因为它的本机版本和jruby不支持它。太好了。

(in /home/braga/prj/eschool/trunk)
jruby -S gem install libxml-ruby
ERROR:  Error installing libxml-ruby:
        ERROR: Failed to build gem native extension.

Building native extensions.  This could take a while...
/home/braga/netbeans-6.9/ruby/jruby-1.5.0/bin/jruby extconf.rb
WARNING: JRuby does not support native extensions or the `mkmf' library.
         Check http://kenai.com/projects/jruby/pages/Home for alternatives.
extconf.rb:23: uninitialized constant CONFIG (NameError)

所以,我必须安装一个替代方案,然后我安装了libxml-jruby gem。然后我又启动了服务器。但是我仍然收到以下错误,

Missing these required gems:
  libxml-ruby  

1 个答案:

答案 0 :(得分:3)

认为您已将require "libxml-ruby"声明为代码或正在使用的插件,请确保您拥有require "libxml-jruby"

希望这是有帮助的