diff --git a/CHANGELOG.md b/CHANGELOG.md index 374258ff1..455f6d8c0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## [Unreleased] +- Fix issue with sprockets reference being nil when + propshaft gem is used instead (https://github.com/heroku/heroku-buildpack-ruby/pull/1452) ## [v270] - 2024-04-23 diff --git a/lib/language_pack/rails3.rb b/lib/language_pack/rails3.rb index b80661b14..33d02c1d3 100644 --- a/lib/language_pack/rails3.rb +++ b/lib/language_pack/rails3.rb @@ -134,7 +134,9 @@ def has_nginx? def sprocket_version_upgrade_needed # Due to https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-3760 sprockets_version = bundler.gem_version('sprockets') - if sprockets_version < Gem::Version.new("2.12.5") + if sprockets_version.nil? + return false + elsif sprockets_version < Gem::Version.new("2.12.5") return "2.12.5" elsif sprockets_version > Gem::Version.new("3") && sprockets_version < Gem::Version.new("3.7.2")