From 31fad4042e6dc8604361c800ab3be1f7a40b7952 Mon Sep 17 00:00:00 2001 From: Nicholas Jakobsen Date: Sat, 24 Oct 2026 09:34:03 -0700 Subject: [PATCH] build: Keep prism below 2 for the `sunspot_rails` suite on Ruby 2.7 Root cause: prism 2.0.0, released 2026-10-21, adds precompiled platform gems that require Ruby 3.3, while its source gem still allows Ruby 2.7. On Ruby 2.7, Bundler resolves `irb`'s `prism` dependency to 2.0.0, picks a precompiled gem and stops with `prism-2.0.0-x86_64-linux-musl requires ruby version < 4.1.dev, >= 3.3`, so `appraisal` is never installed and every Ruby 2.7 `sunspot_rails` job fails with `bundler: command not found: appraisal`. `sunspot_rails.gemspec` now adds a `prism` development dependency below 2 on Ruby 2.7, beside its other per-Ruby pins, so Bundler resolves prism 1.9.0 there. Ruby 2.5 and 2.6 are left out: nothing pulls `prism` in on them, and no `prism` release supports them. Co-Authored-By: Claude Opus 5.5 --- sunspot_rails/sunspot_rails.gemspec | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sunspot_rails/sunspot_rails.gemspec b/sunspot_rails/sunspot_rails.gemspec index 42ecec647..dae848d32 100644 --- a/sunspot_rails/sunspot_rails.gemspec +++ b/sunspot_rails/sunspot_rails.gemspec @@ -45,6 +45,11 @@ Gem::Specification.new do |s| s.add_development_dependency 'psych', '< 4.0' end + # Ruby 2.7 compatibility: its Bundler picks prism 2's precompiled gems, which need Ruby 3.3 + if RUBY_VERSION >= '2.7' && RUBY_VERSION < '3.0' + s.add_development_dependency 'prism', '< 2' + end + s.rdoc_options << '--webcvs=http://github.com/outoftime/sunspot/tree/master/%s' << '--title' << 'Sunspot-Rails - Rails integration for the Sunspot Solr search library - API Documentation' << '--main' << 'README.rdoc'