From: "(kn)" Date: 2001-01-24T06:10:02+09:00 Subject: [ruby-talk:9783] Re: Problem with mod_ruby + mysql. Mark VandeWettering wrote: > I've got a configuration problem of some sort when trying to use the mysql > support in ruby. > > I've got a webpage which works fine when I pipe it through eruby, but when > I try to get at it via apache+mod_ruby, I get the following error messages: > > /tmp/links.rhtml.D35990:25:in `require': Shared object "libmysqlclient.so.6" not found - /usr/local/lib/ruby/site_ruby/1.6/i386-freebsd4.2/mysql.so (LoadError) > from /tmp/links.rhtml.D35990:25 > > I suspect that somehow mod_ruby isn't getting a dynamic load path set properly, > but have been unable to figure out exactly what is wrong. Any ideas? > > Mark does mysql support work in command line+? if yes- perhaps the user under which apache runs does not have access to certain library directories- either find a way to set up LD_LIBRARY_PATH for this user- or you can compile mysql-ruby with the linker option '-rpath' which will hardcode the path of the lib-- (just add '-Wl,-rpath ' to DLDFLAGS--)