I'm trying to use Ruby-WordNet on my recently-Snow-Leopard-upgraded Mac, and I'm getting an error saying that it can't find the bdb library: /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- bdb (LoadError) from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require' /Library/Ruby/Gems/1.8/gems/wordnet-0.0.5/lib/wordnet/lexicon.rb:34 [snip] Predictably, line 34 of lexicon.rb says: 34 require 'bdb' I used porticus to install the macports package for rb-bdb, and it says I have 0.6.5_0 installed: $ port -v activate email@example.com_0 Port command started with PID 93833 Activating rb-bdb @0.6.5_0 Error: port activate failed: Image error: rb-bdb @0.6.5_0 is already active. I can see a bdb.bundle file installed: cto@bigmac-2 (722) $ ls -l opt/local/lib/ruby/vendor_ruby/1.8/i686-darwin10/bdb.bundle -rwxr-xr-x 2 root admin 218168 Oct 18 22:08 opt/local/lib/ruby/vendor_ruby/1.8/i686-darwin10/bdb.bundle ...but I can't find a bdb.rb ruby library anywhere that would satisfy the require. Just for kicks, I tried to download the bdb source after installing the port, and running ruby extconf.rb. It errors with "extconf.rb:90: libdb not found (RuntimeError)" Then "make" gives me this: cto@bigmac-2 (727) (master) $ make make: *** No rule to make target `ruby.h', needed by `bdb.o'. Stop. So no luck with the macport and no luck with compiling. Does anyone have experience with this problem? Any help or suggestions would be greatly appreciated! Many thanks! -Jason -- Posted via http://www.ruby-forum.com/.
On Oct 18, 2009, at 11:53 PM, Jason Fr wrote: > I can see a bdb.bundle file installed: > cto@bigmac-2 (722) $ ls -l > opt/local/lib/ruby/vendor_ruby/1.8/i686-darwin10/bdb.bundle > -rwxr-xr-x 2 root admin 218168 Oct 18 22:08 > opt/local/lib/ruby/vendor_ruby/1.8/i686-darwin10/bdb.bundle /opt/local/lib/ruby/* directories are not in Ruby's library path by default. You'll have to add those directories to your RUBYLIB environment variable. > Just for kicks, I tried to download the bdb source after installing > the > port, and running ruby extconf.rb. It errors with "extconf.rb:90: > libdb > not found (RuntimeError)" Then "make" gives me this: > > cto@bigmac-2 (727) (master) $ make > make: *** No rule to make target `ruby.h', needed by `bdb.o'. > Stop. After upgrading to SnowLeopard you need to reinstall the Developer Tools to get ruby.h and friends. Cheers, Josh