Articles about Computer and IT-related topics

Migration from Sprockets to Propshaft in Ruby-on-Rails

Important points about migration from Sprockets to Propshaft for asset handling in modern Ruby-on-Rails are explained, based on my own experience.

Propshaft was introduced in Rails 7. Unlike Sprockets, Propshaft does not parse, transpile, bundle, or process files. It only digests assets, generates fingerprinted paths, sets HTTP caching headers, and serves files directly from the load path. The Rails core team’s primary asset management focus has shifted from Sprockets to Propshaft. So, adopting Propshaft ensures long-term framework compatibility and is highly recommended in my opinion. Unfortunately, though, the migration from Sprockets to Propshaft isn’t automatic, and there are some traps. Here, I summarise the important points I have noticed during my attempt of migration, which took some time but was successful in the end.

Subscribe to Front page feed