Posted almost 10 years ago. Visible to the public.

Killing wkhtmltopdf during cucumber

wkhtmltopdf hangs on mac during cucumber unless we click on it. The main reason is with the version we use which is 0.11.0_rc1 and in out app/bin we have another version and it is a known issue with these versions. The fix is to go to 0.9.9, to downgrade the version we installed earlier using brew:

* brew uninstall wkhtmltopdf * brew update * brew versions wkhtmltopdf * if you see output like * `0.9.9 git checkout 6e2d550 /usr/local/Library/Formula/wkhtmltopdf.rb` then `cd /usr/local` * git checkout 6e2d550 /usr/local/Library/Formula/wkhtmltopdf.rb NOTE: keep the path and sha1 when you did `brew versions wkhtmltopdf` above * brew install wkhtmltopdf

To make sure you are getting the right wkhtmltopdf

* add this `/usr/local/Cellar/wkhtmltopdf/0.9.9/bin` to your path

Test that it doesn't hangs after generating the pdf from terminal by:

wkhtmltopdf "" ~/Desktop/test.pdf

and this should exit safely after spitting Done

NOTE: If you run brew update and brew upgrade at any point after this, the older version will be updated again. If this happens just use this command to switch brew back to using 0.9.9 like so;

brew switch wkhtmltopdf 0.9.9

Owner of this card:

Nasir Jamal
Last edit:
almost 10 years ago
Posted by Nasir Jamal to HouseTrip Deck
This website uses short-lived cookies to improve usability.
Accept or learn more