I’m trying to get RMagick set up for my Rails application. I’ve currently gotten it so that RMagick works fine in the Rails console (script/console), but it fails when running under my web application. The failure appears to be related to the “require ‘RMagick.so’” inside RMagick.rb silently failing. I’ve checked all my permissions, and can’t find anything wrong there. I’m thinking it may have something to do with the way the server strips out LD_LIBRARY_PATH from the environment variables available to the Rails application, but all my attempts to work my way around that so far have failed. Adding a "SetEnv LD_LIBRARY_PATH ‘/home/scottd72…’ " to my .htaccess doesn’t seem to add the environment variable back to the set visible to dispatch.[f]cgi; meanwhile, attempting to set ENV[‘LD_LIBRARY_PATH’] in dispactch.[f]cgi, environment.rb, or anywhere else in my Ruby code still does not keep the “require ‘RMagick.so’” from silently failing.
Any ideas what might be going wrong and how to fix it?