How Sprockets Works
summary
Explains Sprockets as a pipeline of concrete components: processors return metadata hashes (compilers, compressors, bundle and directive processors) that run in order to produce assets; the environment wires processors and the manifest maps logical names to fingerprinted outputs. Shows development vs production: runtime per-request compilation vs precompiled assets, and error checking for missing assets. Describes tools used: Sass-rails, execjs/DJ for running JS compilers, Shopify’s SVG→PNG generator, node process reuse patch, and cache/GC pain points and planned Rails 5 integrations.
AI-written summary · about
chapters (16)
- 0:00Introduction
- 2:24Why assets pipeline
- 5:37How assets pipeline works
- 7:46Key components
- 10:17Processors explained
- 14:18Directives and manifests
- 16:54Environment and manifest objects
- 19:43Rails integration
- 21:10Sprockets and Sass
- 22:20ExecJS and JavaScript
- 24:52Development vs production
- 27:05File compilation process
- 28:57Key differences
- 29:39Extending sprockets
- 32:51Maintenance and community
- 33:58Q&A
related talks
31mHow Sprockets Works
30mHow Sprockets works
20mMaster the Rails Asset Pipeline: Best Practices for Apps & Gems
24mPropshaft and the Modern Asset Pipeline
29mRails Asset Pipeline: Defunct or Da Funk
34mFrom Sprockets to js-bundling: Evolution of JavaScript tooling in Rails!
25mMAKING JAVASCRIPT GREAT AGAIN IN RAILS
37mWebpacker, It-Just-Works, But How?
