Forum How do I...?

"Errno::EPIPE - Broken pipe" Error when generating PDFs

meowist
Hello,

I have Prince installed here on Mac OSX:
/usr/local/bin/prince

I am using Prince with a Rails app and the Princely gem to generate PDFs from HTML/erb templates. My coworker has no problem running the PDF generating task on his machine, but it fails on mine. Here is the complete server log:

https://gist.github.com/meowist/9b8ad425be15cb6e1427

And the error happens at the Prince command on line 40.

I've tried uninstalling, bundle installing to update my Gemfile and so on, but so far no luck.

Thanks for any help!
mikeday
Does anything show up in the Prince output log file? Can you successfully run Prince from the command-line?
meowist
Log file just contains a timestamp, like so:

"Sun Nov 24 19:46:44 2013: ---- begin"

I can run Prince from the command line, meaning I can type "prince --help" and see a list of commands etc. When I try to run my rake task from the command line, I get the errors I mentioned before ("Broken pipe"). The script works fine for my coworker, so Prince must like not something about my local config.

Thx for your help!
mikeday
Can you run Prince on the command-line and convert a HTML document to PDF? It looks like it's failing during the conversion, but it's difficult to identify what is causing the problem when it's hidden inside another task.