I have a server with nginx and Passenger serving a Ruby on Rails app. It uses Bundler.
Somewhere in this stack, the
$PATH gets set to
/var/www/APPNAME/shared/bundle/ruby/1.8/bin/. This directory contains, indeed, executable gems.
But I need my application to also have
/usr/bin available in its
$PATH. More specific: I need it to be able to run
mogrify; imagemagick commands.
For now, I have symlinked these imagemagick binaries from
ls /var/www/APPNAME/shared/bundle/ruby/1.8/bin/ -ahl #... lrwxrwxrwx 1 root root 16 May 8 16:22 convert -> /usr/bin/convert -rwxr-xr-x 1 ber root 379 Jan 11 08:58 erubis #...
It's more of a quick hack than an actual solution, though.
How can I assign extra directories to
$PATH? And where should I do that? Passenger, nginx, the Rails app?