Why does PDFKit/wkhtmltopdf hang but renders PDF as expected when Rails app is killed?

后端 未结 7 1469
無奈伤痛
無奈伤痛 2020-12-04 12:18

Background

After reading around it seemed to me that Prawn is out and wkhtmltopdf is in. It also seems like the PDFKit and wicked_pdf gems for Rails are the new co

7条回答
  •  离开以前
    2020-12-04 13:00

    The problem is with wkhtmltopdf itself, specifically, any version after 0.9.9. wkhtmltopdf hangs when run directly from the command-line.

    Steps to correct:

    brew uninstall wkhtmltopdf
    cd /usr/local/Library/Formula/
    git checkout 6e2d550 /usr/local/Library/Formula/wkhtmltopdf.rb
    brew install wkhtmltopdf
    

    Then verify the correct version is installed wkhtmltopdf --version which should yield wkhtmltopdf 0.9.9

    Citations:

    1. https://github.com/mileszs/wicked_pdf/issues/110
    2. http://wearepandr.com/blog/article/homebrew-and-installing-old-package-versions#blog_nav

提交回复
热议问题