Skip to content

Update wicked_pdf 1.4.0 -> 2.8.2 (hold wkhtmltopdf-binary at 0.12.3.1)#90

Merged
JuanVqz merged 1 commit into
mainfrom
chore/update-wicked-pdf
Jul 10, 2026
Merged

Update wicked_pdf 1.4.0 -> 2.8.2 (hold wkhtmltopdf-binary at 0.12.3.1)#90
JuanVqz merged 1 commit into
mainfrom
chore/update-wicked-pdf

Conversation

@JuanVqz

@JuanVqz JuanVqz commented Jul 10, 2026

Copy link
Copy Markdown
Member

What

Updates wicked_pdf 1.4.0 → 2.8.2. wkhtmltopdf-binary is intentionally held at 0.12.3.1 (not bumped).

Why

wicked_pdf was exact-pinned at 1.4.0 (2019). Bumping the maintained Ruby gem to 2.8.2 is safe: the render pdf: call and the wicked_pdf_stylesheet_link_tag / wicked_pdf_image_tag helpers are unchanged in 2.x, and there's no wicked_pdf initializer to migrate.

Why the binary is held at 0.12.3.1: I first tried bumping wkhtmltopdf-binary to 0.12.6.10, but CI caught two problems that would also hit production (same Linux binary on Heroku):

  • the 0.12.6.x Linux binary segfaults (SIGSEGV) during PDF generation;
  • wkhtmltopdf 0.12.6 blocks local file access by default, which breaks the PDF's embedded logo/stylesheet.

wkhtmltopdf is EOL (0.12.6 is the last release), so rather than fight an unstable binary, the binary stays at 0.12.3.1 — the exact version production already runs successfully. Only the Ruby gem moves.

Changes

  • Gemfile: wicked_pdf "1.4.0""~> 2.8"; wkhtmltopdf-binary kept at "0.12.3.1" with an explanatory comment
  • --conservative bundle; rack unchanged; both lockfiles updated

Verification

  • PDF controller test (test_show_with_the_PDF_format_renders_a_PDF_successfully) — green
  • Full suite 16/52/0, rubocop + reek clean
  • Live server E2E earlier confirmed upload → PDF download returns a valid %PDF
  • The binary is unchanged from what production already runs, so the SIGSEGV path is avoided

@JuanVqz JuanVqz self-assigned this Jul 10, 2026
wicked_pdf was exact-pinned at 1.4.0 (2019); bump the maintained Ruby gem to
2.8.2. The render pdf: usage and wicked_pdf_stylesheet_link_tag /
wicked_pdf_image_tag helpers are unchanged in 2.x; no initializer to migrate.

wkhtmltopdf-binary is deliberately HELD at 0.12.3.1. Bumping it to 0.12.6.10
segfaulted (SIGSEGV) in the Linux runtime (CI, and by extension Heroku), and
wkhtmltopdf 0.12.6 also blocks local file access by default (breaking the PDF
logo/stylesheet). wkhtmltopdf is EOL, so 0.12.3.1 — the binary production
already runs — stays.

Used --conservative; rack stays at 2.x. Both lockfiles updated.

Verified locally: PDF controller test green, full suite 16/52/0, rubocop +
reek clean, and a live server upload -> PDF download returns a valid %PDF.
@JuanVqz JuanVqz force-pushed the chore/update-wicked-pdf branch from b1c80ee to 19aab25 Compare July 10, 2026 14:41
@JuanVqz JuanVqz changed the title Update PDF stack: wicked_pdf 1.4.0 -> 2.8.2, wkhtmltopdf-binary -> 0.12.6.10 Update wicked_pdf 1.4.0 -> 2.8.2 (hold wkhtmltopdf-binary at 0.12.3.1) Jul 10, 2026
@JuanVqz JuanVqz marked this pull request as ready for review July 10, 2026 16:15
@JuanVqz JuanVqz merged commit 3e72d56 into main Jul 10, 2026
2 checks passed
@JuanVqz JuanVqz deleted the chore/update-wicked-pdf branch July 10, 2026 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant