From: Michael Granger Date: 2009-10-25T12:20:59+09:00 Subject: Re: BDB::Fatal error from WordNet --Apple-Mail-4--1039189616 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes On Oct 20, 2009, at 12:26 AM, Jason Fr wrote: > I've got a ruby script that calls Ruby-WordNet which in turns calls > DBD. > I'm getting an error from DBD that looks like this (there's some debug > output from wordnet's lexicon.rb that I turned on): > > $ sh run_everything.sh > Tue Oct 20 03:19:59 EDT 2009 > ------ now running determine_features.rb > Mode is: 71571 > Mode is: 0444 > Using readonly flags > Env flags are: 10000000000000000000, dbflags are 0 > EnvOptions: {:set_timeout=>50, :set_lk_detect=>1, :set_verbose=>true} > /usr/local/lib/site_ruby/1.8/wordnet/lexicon.rb:121:in `initialize': > Error while opening Ruby-WordNet data files: /usr/share/ruby-wordnet: > Invalid argument (BDB::Fatal) > from /usr/local/lib/site_ruby/1.8/wordnet/lexicon.rb:121:in > `new' > from /usr/local/lib/site_ruby/1.8/wordnet/lexicon.rb:121:in > `initialize' > from ./encoder_tools.rb:145:in `new' > from ./encoder_tools.rb:145:in `initialize' > from ./determine_features.rb:32:in `new' > from ./determine_features.rb:32 > > The actual line in lexicon.rb that causes this error is: > > @env = BDB::Env::new( dbenv, envflags, EnvOptions ) > > What I can't figure out is which argument here is invalid, or > otherwise > what's going wrong. This is happening because the first argument to BDB::Env.new is a database directory, and you've given it a directory without a database. You'll need to build the Wordnet database using the included 'convertdb.rb' script and copy the resulting directory to /usr/share/ ruby-wordnet, then you should be set. -- Michael Granger Rubymage, Architect, Believer The FaerieMUD Consortium --Apple-Mail-4--1039189616--