From: Chad Fowler Date: 2005-05-13T04:33:23+09:00 Subject: Re: gem install of amatch fails for me On 5/11/05, Martin Pirker wrote: > Hi... > > venturing into rubygems land I tried... > > # gem install amatch > Attempting local installation of 'amatch' > Local gem file not found: amatch*.gem > Attempting remote installation of 'amatch' > Building native extensions. This could take a while... > ruby extconf.rb install amatch > creating Makefile > > make > make: Nothing to be done for 'all'. > > make install > install -c -p -m 0755 amatch.so /usr/lib/ruby/gems/1.8/gems/amatch-0.1.4/lib > Successfully installed amatch-0.1.4 > Installing RDoc documentation for amatch-0.1.4... > > seems fine so far, but... > > # which agrep.rb > /usr/bin/agrep.rb > # agrep.rb test test.txt > /usr/lib/ruby/gems/1.8/gems/amatch-0.1.4/bin/agrep.rb:47: uninitialized > constant Amatch (NameError) > from /usr/bin/agrep.rb:18:in 'load' > from /usr/bin/agrep.rb:18 > > digging further... > > lib # ldd amatch.so > linux-gate.so.1 => (0xffffe000) > libruby.so.1.9 => not found > libpthread.so.0 => /lib/libpthread.so.0 (0xb7f9e000) > libdl.so.2 => /lib/libdl.so.2 (0xb7f9a000) > libcrypt.so.1 => /lib/libcrypt.so.1 (0xb7f6c000) > libm.so.6 => /lib/libm.so.6 (0xb7f49000) > libc.so.6 => /lib/libc.so.6 (0xb7e32000) > /lib/ld-linux.so.2 (0x80000000) > > but I'm using > > # ruby -v > ruby 1.8.2 (2004-12-25) [i686-linux] (from Gentoo) > > # gem --version > 0.8.10 > > any idea what goes wrong here? > Thanks! > Hi! It looks like there's a problem with the 'amatch' gem. It includes the precompiled .so file (in lib) from the developer's machine. If you look in your "ext" subdirectory where the gem was installed, you'll see the _real_ .so file. For now, you could hack amatch.rb to unshift the gem's 'ext' directory on your $: if you want to use the gem before it gets fixed. -- Chad Fowler http://chadfowler.com http://rubycentral.org http://rubygarden.org http://rubygems.rubyforge.org (over 300,000 gems served!)