I have a custom Apache initializers in order to have my Homebrew binaries accessible:
SetEnv PATH /usr/local/bin:/usr/local/sbin:$PATH
However, my Rails (3.0.4) applications cannot find any binaries unless full paths are given. For example:
begin
`convert`
raise Errno::ENOENT if $?.exitstatus == 127
rescue Errno::ENOENT
logger.info "command 'convert' not found: ensure Image Magick is installed"
end
Results in an exception being raised each time (even though the convert binary exists under ‘/usr/local/bin/convert’). Any ideas on how to fix this so my Rails applications know about the path? Thanks!
I’m not sure if I did a system update or what happened exactly, but I had both Brew and Port configured on my system. I had two initializer files:
The soution was to remove the unused
port.conf. Not sure why this was causing issues in Apache (and I seem to remember it working in the past). However, multiple calls toSetEnvseem to overwrite eachother.