2012-11-30 82 views
1

我想使用rjb來調用standford解析器。我已經成功安裝了rjb的gem,並按照rjb網站中的建議設置了JAVA_HOME路徑。要求'rjb'在irb上失敗

 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... 
    [[email protected] 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/" 
    [[email protected] 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/" 
    [[email protected] 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/" 
    [[email protected] 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' 
[[email protected] 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>' 

有人可以告訴我是什麼問題?

+0

就是Java在您的路徑require 'rubygems'require 'rjb'? – kristianp

回答