Including ~/opt/lib Libraries In A Passenger Rails App
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?
The environment.rb way sounds like the way to go, though you might want to append to
LD_LIBRARY_PATH instead. Also I'd make sure to use the full path to that directory just in case.
Alternatively you might be able to use
.htaccess directives, similar to what is described @ http://wiki.rubyonrails.org/rails/pages/HowToUseOracleWithFastCGI
- → Trigger a click with jQuery using link_to of rails 4
- → Adding html data attribute to simple_forms input
- → How to remove parameters from the root URL if it does I18n
- → passing parameters to rails back end from an ajax call
- → Blocking ?page= in robots.txt
- → react js and rails Updating state on a component with active record relationship
- → State not passed into prop
- → Cannot read property 'modalIsOpen' of undefined
- → Objects not valid issue
- → How to map API params to model
- → Consuming webhooks shopify-api
- → How to add ScriptTag on shopify_api gem?