开发者

no such file to load - require wordnet fails - troubleshoot gem installation

my ruby environment cant see an 开发者_运维问答installed gem, at least the require fails

It's about the gem wordnet http://deveiate.org/projects/Ruby-WordNet I start an example script ( as user of course )

./meronymTree.rb 
./meronymTree.rb:8:in `require': no such file to load -- wordnet (LoadError)
    from ./meronymTree.rb:8

In some example scripts it'S called "WordNet" and in some it's lowercase, the error is same.

here's the scripts first lines

#!/usr/bin/ruby -w

$LOAD_PATH.unshift "lib"
require 'wordnet'

Check if gem is installed, as user root

gem list |grep word
wordnet (0.0.5)


root@auedv18:/var/lib/gems/1.8/gems/wordnet-0.0.5# ls
ChangeLog  convertdb.rb  examples  lib  LICENSE  rake  Rakefile  Rakefile.local  README  spec  utils.rb

Other gems are fine.

I am on current ubuntu and got ruby1.8 and rubygems-1.8.6 on it, (if that makes a difference).

hm and i downloaded the wordnet-0.0.5.gem file from above site and did

gem install wordnet-0.0.5.gem 


Try this:

require 'rubygems'
require 'wordnet'
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜