要求'rjb'在irb上失败

时间:2012-11-30 07:37:07

标签: irb rjb

我想使用rjb来调用standford解析器。我已经设法为rjb安装gem并按照rjb网站的建议设置JAVA_HOME路径。

     gem install rjb
     Building native extensions.  This could take a while...
     Successfully installed rjb-1.4.3
     1 gem installed
     Installing ri documentation for rjb-1.4.3...
     Installing RDoc documentation for rjb-1.4.3...
     [root@avinash shoutout_railsengine]# ruby -v -e "p ENV['JAVA_HOME']"
        ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux]
     "/usr/java/jdk1.7.0/"
     [root@avinash shoutout_railsengine]# ruby -v -e "p ENV['JAVA_HOME']"
     ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux]
     "/usr/java/jdk1.7.0/"
     [root@avinash shoutout_railsengine]# ruby -v -e "p ENV['JAVA_HOME']"
     ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux]
     "/usr/java/jdk1.7.0/"
     [root@avinash shoutout_railsengine]# ruby -d -rubygems -rrjb -e 'Rjb::load'
       Exception `LoadError' at <internal:lib/rubygems/custom_require>:29 - no such   file to load -- rubygems/defaults/operating_system
     Exception `LoadError' at <internal:lib/rubygems/custom_require>:37 - no such file to load -- rubygems/defaults/operating_system
     Exception `LoadError' at <internal:lib/rubygems/custom_require>:29 - no such file to load -- rubygems/defaults/ruby
     Exception `LoadError' at <internal:lib/rubygems/custom_require>:37 - no such file to load -- rubygems/defaults/ruby
     Exception `LoadError' at <internal:lib/rubygems/custom_require>:29 - no such file to load -- rjb
    Exception `LoadError' at <internal:lib/rubygems/custom_require>:37 - no such file to load -- rjb
  <internal:lib/rubygems/custom_require>:29:in `require': no such file to load -- rjb (LoadError)
     from <internal:lib/rubygems/custom_require>:29:in `require'
 [root@avinash shoutout_railsengine]# irb
  irb(main):001:0> require 'rjb'
  LoadError: no such file to load -- rjb
    from <internal:lib/rubygems/custom_require>:29:in `require'
    from <internal:lib/rubygems/custom_require>:29:in `require'
    from (irb):1
    from /usr/local/bin/irb:12:in `<main>'

有人可以告诉我这是什么问题吗?

1 个答案:

答案 0 :(得分:0)

require 'rubygems'

之前尝试require 'rjb'