I’m having trouble getting a rails app on Dreamhost’s Passenger to see compiled libraries in my ~/opt/lib directory. I have to put them here because I don’t have root access.
I can boot up my app in ./script/console and it sees them libraries just fine because I updated my .bash_profile’s LD_LIBRARY_PATH environment variable to include ~/opt/lib.
I’ve tried putting ENV['LD_LIBRARY_PATH'] = '~/opt/lib' in my environment.rb file but it doesn’t seem too help. I get the following error from Passenger when I navigate to my site: libodbcinst.so.1: cannot open shared object file: No such file or directory – /home/username/opt/lib/odbc.so
Anyone have experience with this?
Thanks
The environment.rb way sounds like the way to go, though you might want to append to
LD_LIBRARY_PATHinstead. Also I’d make sure to use the full path to that directory just in case.Alternatively you might be able to use
.htaccessdirectives, similar to what is described @ http://wiki.rubyonrails.org/rails/pages/HowToUseOracleWithFastCGI