From: Chris Gansen Date: 2006-07-21T03:55:00+09:00 Subject: Trouble setting LD_LIBRARY_PATH for FastCGI script ------=_Part_109331_11944911.1153421696629 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello - I'm trying to exec a ruby script via FastCGI (on Apache 2.0), and cannot properly set the env. variable LD_LIBRARY_PATH at run time. I've tried adding: SetEnv LD_LIBRARY_PATH /path/to/lib in a .htaccess file, but to no avail. Perl, however, happily recognizes it. Setting ENV['LD_LIBRARY_PATH'] does not take effect either. In the error_log, I see: [Thu Jul 20 11:32:33 2006] [warn] FastCGI: (dynamic) server "/web/server_root/fcgi-bin/index.fcgi" restarted (pid 11242) /path/to/ruby_bin/lib/ruby/site_ruby/1.8/i686-linux/fcgi.so: libfcgi.so.0: cannot open shared object file: No such file or directory - /path/to/ruby_bin/lib/ruby/site_ruby/1.8/i686-linux/fcgi.so (LoadError) from /path/to/ruby_bin/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require' from /path/to/index.fcgi:23 Strangely, when I execute the fcgi script from the command line, as: $ LD_LIBRARY_PATH=/path/to/lib ./index/fcgi I receive: ./index.fcgi:25: undefined method `each_cgi' for FCGI:Class (NoMethodError) Which is particularly vexing. This configuration works on another machine, where the libraries are not in 'special' places. Any advice on how to get Ruby to find the correct library? -c- ------=_Part_109331_11944911.1153421696629--