From: Eric Schwartz Date: 2004-06-29T05:32:56+09:00 Subject: Re: debian ruby libraries "Zach Dennis" writes: > I've got a few directories with ruby libraries. > > /usr/lib/ruby/1.8 > /usr/local/lib/ruby/1.8 > > I am on a debian package and I installed "apt-get install libmysql-ruby1.8". > It installed the mysql.so file into the /usr/lib/ruby/1.8/i386-linux/ > directory. When I run irb or ruby it doesn't appear to be looking there. What version of ruby are you running? $ locate mysql.so /usr/lib/ruby/1.6/ia64-linux/mysql.so /usr/lib/ruby/1.8/ia64-linux/mysql.so $ dpkg -l irb ruby1.8 Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed |/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad) ||/ Name Version Description +++-==============-==============-============================================ ii irb 1.8.1-7 Interactive Ruby (irb) ii ruby1.8 1.8.1-8 Interpreter of object-oriented scripting lan $ irb irb(main):001:0> require 'mysql' => true irb(main):002:0> puts $:.join(', ') /usr/local/lib/site_ruby/1.8, /usr/local/lib/site_ruby/1.8/ia64-linux, /usr/local/lib/site_ruby, /usr/lib/ruby/1.8, /usr/lib/ruby/1.8/ia64-linux, . => nil > Instead it looks in the /usr/local/lib/ruby/1.8 directory. Do you have mysql.so there? Do you have $RUBYLIB set to look there before the predefined paths? Are you explicitly setting $: in your scripts? Those are the only things I can think of that could cause this, since /usr/local/lib/ruby/1.8 is not in $: by default in ruby1.8. > Any quick and easy change to get ruby to look in the proper > directory or to tell debian to install to the proper directory? Debian is installing it in the proper directory; why you're not looking there is a good question, though. -=Eric -- Come to think of it, there are already a million monkeys on a million typewriters, and Usenet is NOTHING like Shakespeare. -- Blair Houghton.