Saeloun
Read post

Migrating from Sprockets to Propshaft in Rails 8

Rails 8 replaces Sprockets with Propshaft as the default asset pipeline. Propshaft is a lightweight pipeline focused solely on fingerprinting and serving assets, delegating bundling and transpilation to dedicated tools like esbuild or Import Maps. A step-by-step migration guide covers updating the Gemfile, installing npm packages, and migrating popular libraries including Bootstrap, jQuery, Select2, and Font Awesome from gem-based assets to npm packages. The guide also addresses handling gems without npm equivalents (like cocoon), CSS asset path changes, common errors and their fixes, and scenarios where staying with Sprockets may be preferable.

    #rails
May 19•4m read time•From blog.saeloun.com
Post cover image
Table of contents
What is Propshaft?Migrating a Rails 7.1 app to PropshaftMigrating popular librariesHandling gems without npm equivalentsHandling CSS asset pathsUpdate layout and configurationCommon errors and fixesWhen to stay with SprocketsPros and consConclusionReferences
44 Impressions
Saeloun's image
Saeloun

Saeloun Blog offers insights, tutorials, and updates on Ruby on Rails development, React.js, and sof...

28 Followers

•

117 Upvotes

Would you recommend this post?

Copy link
WhatsApp
Facebook
X
New Squad
  • © 2026 Daily Dev Ltd.
  • Guidelines
  • Explore
  • Tags
  • Sources
  • Squads
  • Leaderboard