LoadError -> `require': (null) - /usr/local/lib/ruby/1.6/i686-linux/sqlite.so (LoadError)

rubyists-

i’m getting

`require’: (null) - /usr/local/lib/ruby/1.6/i686-linux/sqlite.so (LoadError)

using

ruby 1.6.7 (2002-03-01) [i686-linux]

on

Linux 2.4.2-2 #1 SMP Fri Nov 23 20:51:15 GMT 2001 i686 unknown

at first i thought this was a LD_LIBRARY_PATH type error - but it does not
look that way anymore. i searched a bit and found some posts regarding a
patch for this error so i upgraded my ruby - but i still get the error ;-(

any ideas?

thanks in advance.

-a

···

====================================

Ara Howard
NOAA Forecast Systems Laboratory
Information and Technology Services
Data Systems Group
R/FST 325 Broadway
Boulder, CO 80305-3328
Email: ahoward@fsl.noaa.gov
Phone: 303-497-7238
Fax: 303-497-7259
====================================

I think this happens if sqlite.so doesn’t have an Init_sqlite() functon.
E.g.:

[pbrannan@zaphod ruby]$ irb
irb(main):001:0> require ‘/usr/lib/libm’
LoadError: (null) - /usr/lib/libm.so
from (irb):1:in `require’
from (irb):1

If this is a C++ library, make sure that Init_sqlite s defined with
extern “C”.

I wonder how hard it would be to get the interpreter to give a more
informative error message.

Paul

···

On Tue, Dec 03, 2002 at 12:30:58PM +0900, ahoward wrote:

`require’: (null) - /usr/local/lib/ruby/1.6/i686-linux/sqlite.so (LoadError)

I wonder how hard it would be to get the interpreter to give a more
informative error message.

Just the time for you to upgrade your version of ruby :slight_smile:

pigeon% irb
irb(main):001:0> require '/usr/lib/libm'
LoadError: irb: undefined symbol: Init_libm - /usr/lib/libm.so
        from (irb):1:in `require'
        from (irb):1
irb(main):002:0>
pigeon%

pigeon% ruby -v
ruby 1.6.8 (2002-11-09) [i686-linux]
pigeon%

Guy Decoux