Skip to content

Bump image_processing from 1.14.0 to 2.2.0 and add ruby-vips - #39

Merged
misabegovic merged 3 commits into
mainfrom
ccr-52fe37ed-5a23zx
Oct 18, 2026
Merged

misabegovic merged 3 commits into
mainfrom
ccr-52fe37ed-5a23zx

Conversation

@misabegovic

@misabegovic misabegovic commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Supersedes #32.

Why not merge #32 as-is

image_processing 2.0 made mini_magick and ruby-vips soft dependencies that you must add to your Gemfile yourself. The plain Dependabot bump therefore removed ruby-vips from the bundle. Active Storage uses vips by default for both variants and image analysis. Without the gem, Hunt#treasure_image uploads would quietly skip analysis (no width/height metadata), and any future .variant call would raise. CI stayed green only because no test exercises that path.

Changes

  • image_processing ~> 1.2 → ~> 2.2
  • add gem "ruby-vips", require: false (libvips is already installed in the Dockerfile and CI test jobs)
    • require: false matters. Active Storage itself does require "ruby-vips" behind a rescue LoadError. A bare gem would be loaded by Bundler.require outside that rescue, so the app would fail to boot wherever libvips is missing (e.g. the scan_js CI job, which is what failed on the first commit).
  • mini_magick stays dropped, since nothing uses it
  • .claude/docs/log.md: log entry for this Dependabot batch

Verification (local, Ruby 3.4.11)

  • bin/rails test: 419 runs, 0 failures, 0 errors
  • bin/rubocop: no offenses
  • With libvips present: an ImageProcessing::Vips resize works, and ActiveStorage::Analyzer::ImageAnalyzer::Vips accepts image blobs
  • With libvips hidden: the bare-gem version reproduces the CI Could not open library 'vips.so.42' boot crash. With require: false, bin/importmap audit passes and Active Storage reports VIPS_AVAILABLE=false, the same as on main

🤖 Generated with Claude Code

https://claude.ai/code/session_01UZdu9KhK3eVCqk8Tdwm6tA

image_processing 2.0 made mini_magick and ruby-vips soft dependencies,
so the plain Dependabot bump (#32) silently dropped ruby-vips. Active
Storage uses the vips processor/analyzer by default, so add ruby-vips
explicitly to keep treasure_image analysis and any variants working.
mini_magick stays dropped since nothing uses it.

Supersedes #32.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UZdu9KhK3eVCqk8Tdwm6tA
A bare `gem "ruby-vips"` is loaded by Bundler.require at boot, which
crashes when libvips is not installed (CI scan_js job). Active Storage
already requires ruby-vips itself behind a LoadError rescue, so
`require: false` restores the previous behaviour of image_processing 1.x,
where ruby-vips was only a transitive dependency.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UZdu9KhK3eVCqk8Tdwm6tA
@misabegovic
misabegovic merged commit 1de7e47 into main Oct 18, 2026
6 checks passed
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.

2 participants