Closed AndyObtiva closed 1 month ago
We are hitting this too, using the ruby:3.3.1
Docker image (aka 3.3.1-bookworm
). I found a related issue on StackOverflow and think I'll try the recommended path of grabbing libssl
manually.
You have to use the binary built against Debian bookworm
. It works with OpenSSL3.
wkhtmltopdf_binary
gem still don't support it (see https://github.com/zakird/wkhtmltopdf_binary_gem/issues/162).
The package can be downloaded from Github (see https://github.com/wkhtmltopdf/packaging/issues/155).
Get the binary from the package and setup the project to use it with something like this:
# config/initializers/wicked_pdf.rb
WickedPdf.config = {
exe_path: Rails.root.join("bin", "wkhtmltopdf-amd64").to_s, # or wherever you put it
enable_local_file_access: true
}
Hit this issue as well. We we're able to install the libssl
manually and get past it.
RUN wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.22_amd64.deb
RUN dpkg -i libssl1.1_1.1.1f-1ubuntu2.22_amd64.deb
Edit: I don't think this workaround is ideal.
Also changing our base to FROM ruby:3.3.1-bullseye
works for us.
wkhtmltopdf_binary
is now supporting Debian 12 on 0.12.6.7
:tada:
I think this can be closed btw
@AndyObtiva Let me know if this solves your problem or not please. Feel free to reopen if it doesn't. Thank you.
My OS is Alpine Linux (ruby:3.1-alpine
as mentioned in the issue description body), not Debian 12. But, we stumbled upon a workaround that is good enough for now. If we decide to do an upgrade in the future, I will let you know if wkhtmltopdf_binary
would not work.
Thank you.
Issue description
After we upgraded our Rails 7 app to Ruby 3.1 and OpenSSL 3 in our build server, we are having an issue when using our Rails app to generate a PDF where
wicked_pdf
somehow fails due to expecting OpenSSL 1.1.We are installing
wkhtmltopdf
as a prerequisite from a Docker image (madnight/docker-alpine-wkhtmltopdf
).Expected or desired behavior
We expect
wicked_pdf
to work normally with our Docker image that has OpenSSL3 and Ruby 3.1 instead of OpenSSL 1.1 and Ruby 2.7System specifications
wicked_pdf gem version (output of
cat Gemfile.lock | grep wicked_pdf
):wkhtmltopdf version (output of
wkhtmltopdf --version
):Version
0.12.5
, which comes with the Docker imagemadnight/docker-alpine-wkhtmltopdf
whtmltopdf provider gem and version if one is used:
We don't use
wkhtmltopdf-binary
.platform/distribution and version (e.g. Windows 10 / Ubuntu 16.04 / Heroku cedar):
Alpine Linux:
ruby:3.1-alpine
--
We just tried relying on
wkhtmltopdf-binary
instead of thewkhtmltopdf
library in the Docker image to fix the issue and our web server kept crashing upon accessing PDF URLs that usewicked_pdf
.Is there a way to make
wicked_pdf
work with OpenSSL3 usingwkhtmltopdf
? If not, canwicked_pdf
work with an alternative low-level PDF library that is compatible with OpenSSL 3, like puppeteer perhaps?