BDB::Fatal error from WordNet

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:innew’
from /usr/local/lib/site_ruby/1.8/wordnet/lexicon.rb:121:in
initialize' from ./encoder_tools.rb:145:innew’
from ./encoder_tools.rb:145:in initialize' from ./determine_features.rb:32:innew’
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.

Possibly useful info: I’ve successfully built and installed bdb-0.6.5
from source- that’s the one I want to be running. However I also have
the libdb4.6-ruby1.8 package installed on the same machine (and
according to apt-cache showpkg it’s using 0.6.2-0ubuntu1). So I’m
unclear which actual lib I’m using when this error happens.

Does anyone have any ideas about how to get past this?

Thanks in advance for any and all advice.

Cheers,
-Jason

On Oct 20, 2009, at 12:26 AM, Jason Fr wrote:

Using readonly flags
from ./encoder_tools.rb:145:in initialize' from ./determine_features.rb:32:innew’
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.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs