Stephyn Butcher <tendzin.dorje / starpower.net> wrote in message news:<8BACDF74-B488-11D7-B1F0-000393A478C8 / starpower.net>...
> If you *can't* still run test.rb from the compilation directory, I 
> would start over until you can...that would limit the problem search 
> space.

Thanks for trying to help, but I don't think this is the same problem.
It finds the library, but can't load it. Let me start from scratch:

%> ruby extconf.rb --with-mysql-include=/usr/include/mysql/
--with-mysql-lib=/usr/lib/mysql/

checking for mysql_query() in -lmysqlclient... yes
checking for mysql.h... yes
creating Makefile
cpp0: warning: changing search order for system directory
"/usr/include"
cpp0: warning:   as it has already been specified as a non-system
directory

%> make
gcc -shared  -L/usr/lib/mysql/ -L/usr/lib/ruby/1.6/i386-linux
-L/usr/lib  -o mysql.so  -L. -lruby -lmysqlclient -lc

%> 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?