I've setup Apache + Rails + Passenger and the app loads correctly (for the most part). The application uses Tesseract and GS to convert PDFs into images and then take their text and insert it into the database.
When I test the application using rails s, everything functions normally, but when I try to run some of the functions from the passenger instance, I get the following error in my apache log:
App 14107 stderr: sh: tesseract: command not found
The error occurs for the following code:
%x(gs -dNOPAUSE -dBATCH -sDEVICE=pngalpha -r300 -sOutputFile="page%03d".png #{self.doc.path})
%x(for f in page*.png ; do tesseract $f $f.out; done)
There is nothing in my rails production.log file that indicates any errors.
I'm running CentOS 6 and I built my tesseract using this guide: https://www.simpleservers.co.uk/clients/whmcs/knowledgebase/600/Install-Tesseract-OCR-libs-from-sources-in-Centos.html
The user that passenger runs as can also run the command tesseract. I checked in its console, but for some reason, passenger can't run it. Do I need to enable it for the apache user somehow?
Thanks