Upgrade asset pipeline to Sprockets 4 (sass-rails 5 -> 6)#81
Merged
Conversation
sass-rails 5.1.0 capped sprockets at < 4.0; bumping it to ~> 6.0 lifts the cap and moves the app onto Sprockets 4.2.2 (sass-rails 6 delegates SCSS compilation to sassc-rails). Both lockfiles updated. Kept the update scoped: used --conservative so rack stays at 2.2.23 rather than being dragged to 3.x as collateral. The app/assets/config/manifest.js Sprockets 4 requires was already present. This unblocks two follow-ups that Sprockets 3.x's unconditional CoffeeScript engine was blocking: removing coffee-rails and swapping uglifier -> terser. Verified: boots on Sprockets 4.2.2, assets:precompile succeeds (application js/css + pdf.css, including the font-awesome and fastruby/styleguide imports), and the full test suite passes (16 runs, 52 assertions, 0 failures).
JuanVqz
added a commit
that referenced
this pull request
Jul 9, 2026
coffee-rails was dead: its only file, app/assets/javascripts/home.coffee, was the default Rails scaffold comment block (three comment lines, zero code). Converted that stub to an equivalent no-op home.js and dropped the gem; both Gemfile.lock and the dual-boot Gemfile.next.lock updated (also drops coffee-script / coffee-script-source). This was blocked under Sprockets 3.x (which registered a CoffeeScript engine unconditionally and required the coffee_script lib at precompile); the Sprockets 4 upgrade (#81) removed that coupling, so the gem is now cleanly removable. Verified locally: boots, assets:precompile succeeds (application.js incl. home.js, application.css, pdf.css), test suite green (16 runs, 52 assertions, 0 failures), rubocop clean (exact CI config), reek clean. System tests not run locally (no chromedriver in this env) — covered by CI; change is a no-op asset conversion so risk is minimal. Co-authored-by: Juan Vásquez <jvasquez@navigatingcancer.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Moves the asset pipeline onto Sprockets 4 by upgrading
sass-rails~> 5.0→~> 6.0.Why
sass-rails 5.1.0constrainedsprockets (>= 2.8, < 4.0), pinning the app to Sprockets 3.7.5. That old Sprockets version registers a CoffeeScript engine unconditionally and, duringassets:precompile, requires thecoffee_scriptlib — which blocks two cleanups (removing the deadcoffee-rails, swappinguglifier→terser). Sprockets 4 dropped those built-in language engines, so this upgrade is the prerequisite that unblocks them.Changes
sass-rails~> 5.0→~> 6.0(delegates SCSS compilation tosassc-rails)sprockets 4.2.2(was 3.7.5); addssassc-rails 2.1.2Gemfile.lockand the dual-bootGemfile.next.lockupdated--conservativesorackstays at 2.2.23 rather than being dragged to 3.x as collateral — a rack major is out of scope hereapp/assets/config/manifest.js(required by Sprockets 4) was already present; no change neededVerification
assets:precompilesucceeds —application.js,application.css, andpdf.cssall compile, including the@import "font-awesome"and@import "fastruby/styleguide"pathssassgem deprecation warnings are gone (sass-rails 6 usessassc)Follow-ups this unblocks
coffee-rails(dead; only file is an empty scaffold stub)uglifier→terser