rposborne/wkhtmltopdf-heroku

Question: using wkhtmltopdf-heroku during Development on Mac

fatuhoku opened this issue · 2 comments

I'm developing on a MacBook Pro, deploying to Heroku.

I'm following the README, and it tells me that because using pdfkit I don't need to configure anything. However, when I run I get the following error:

command failed (exitstatus=126): ~/.rvm/gems/ruby-2.2.4/gems/wkhtmltopdf-heroku-2.12.3.0/bin/wkhtmltopdf-linux-amd64 --quiet --page-size Letter --margin-top 8mm --margin-right 8mm --margin-bottom 8mm --margin-left 8mm --encoding UTF-8 - -

So it looks like wkhtmltopdf-linux-amd64 is specific to Ubuntu... README.md is very confusing — it says that pdfkit users don't need to configure anything, yet if you want the app to run on both Mac and Ubuntu there's some configuration necessary.

You will need to configure the path manually. You can get the path to the executable by using this: `Gem.bin_path('wkhtmltopdf-heroku')`

Yes, it seems the path is configured correctly.

The problem here is that you are trying to run a linux(ubuntu) program in OS X. :)
The binary included in this gem only works in Ubuntu 14 LTS (wkhtmltopdf-linux-amd64)
If you need to run it in OS X, please use this:
https://github.com/pallymore/wkhtmltopdf-binary-edge

(just make sure it's only used in development group).

Got it. Working well.