From: Brian Candler Date: 2003-07-16T16:59:12+09:00 Subject: Re: ruby-mysql library load error On Wed, Jul 16, 2003 at 01:04:05PM +0900, Eric Anderson wrote: > %> echo "puts 'test'" | ruby -w -r ./mysql.so > 0: (null) - ./mysql.so (LoadError) > > I just had a thought after writing this. I did a locate on mysql.so > and I noticed that the following file exists: > /usr/lib/php4/mysql.so > > Could it be trying to load that even though I am specifying > "./mysql.so". How do I change the dynamic library search path? ruby -r /path/to/the/correct/mysql.so or change $: - but I don't think that's the problem as you explicitly gave "./" as the path. You could try strace/truss/ktrace (depending on your OS) on ruby: strace ruby -r ./mysql.so which should show you what files it's trying to access. Regards, Brian.