Closed khalilgharbaoui closed 5 years ago
I decided to create my own fork/version and gem that is also compatible with Alpine Linux 3.9+
https://github.com/khalilgharbaoui/wkhtmltopdf-binary-edge-alpine
I added a link back to this repo in the readme and in the credits section.
would be great if there was a link pointing to that repo from yours for Alpine Linux users?
Cheers
Hi @khalilgharbaoui - sorry I've been doing away from the gem approach for awhile now.
Our apps are all running in containers with wkthmltopdf
installed as binaries instead of provided via gems.
I will add your fork in the README file. Thanks!
When on Alpine Linux the following error accures:
The included binary is there but it's not compatible with alpine linux.
I see in
bin/wkhtmltopdf
that the case statement will matchRUBY_PLATFORM
with:/64.*linux/
In this case, alpine linux version has:
x86_64-linux-musl
its platform which will match up with the regex But fail without any specific error about the platform not being the right one!This is confusing and hard to debug.
I noticed you said:
This repo is meant for common development uses (e.g. mac, ubuntu) - if I include a binary for every system then gem would be massive...
(https://github.com/pallymore/wkhtmltopdf-binary-edge/issues/12#issuecomment-399633610)It's understandable but then again Alpine Linux is a very common development use case these days. I think a lot of ppl depending on this gem would appreciate the support for it, especially when trying to use lightweight docker images.
I'll see if I can make a fork and PR for it.
Maybe at least wrapping the binary execution call in a rescue block wouldn't hurt?