wkhtmltopdf_binary_gem: doesn't work on Alpine
I’m using docker image ruby:2.6.3-alpine and this gem didn’t work. To work, you have to install by apk add wkhtmltopdf
About this issue
- Original URL
- State: open
- Created 7 years ago
- Reactions: 1
- Comments: 16 (3 by maintainers)
This works for me in alpine 3.18 without using the binary gem:
On Alpine Linux 3.14.2 you don’t need the
wkhtmltopdf-binarygem because it can be installed natively. I added the gem to the development group because I only need it on Mac OS X:On Alpine Linux 3.14.2 the wkhtmltopd can be added like this natively:
With that it’s globally available.
Anyone experiencing this issue with latest?
GEMFILE
gem 'wkhtmltopdf-binary', '~> 0.12.5'INSTALL
gem install wkhtmltopdf-binaryI can confirm this as of today.
I was using the gem for production environment in a
ruby:2.5.3-alpineDocker image and it would not work.Left the gem for development and installed
wkhtmltopdfin the image and now it’s working.If using gem
wicked_pdfwe need to specify theexe_pathwherewkhtmltopdfis now installed.Thanks for the suggestion, I will try it now. The package
wkhtmltopdfwas remove from Alpine starting from the version 3.15.That’s very bad news 😦 In the Alpine release notes they recommend to use weasyprint, an alternative to wkhtmltopdf. Does anybody has experience with it?
Hi There, since Alpine 3.15 this library has now been removed from their package repository. Having this project now support alpine is more important than ever, since a lot of applications now run in alpine docker containers. Thank you!
@unixmonkey Maybe we can close this issue 🤝 The other gems/repos are good alternatives, as mentioned by guys🥇
Assuming your gems are located in
/bundle, you could add afterbundle install:It’s ugly but works like a charm
yes, it was available in the console. I could type
wkhtmltopdfand to the help instructions.Just installing the wkhtmltopdf did not help me. I followed this instructions and it helped me: https://stackoverflow.com/a/56971343/847670