Master the Rails asset pipeline
summary
Shipable recipe for packaging Rails front-end assets: a plugin system that powers the Avo gem and is already used by hundreds of applications, supports layered delivery using importmaps, propshaft, ESBuild (or Vite) and npm packages, and documents three practical distribution strategies — publish an npm package, prebuild assets inside the gem, or expose built files via middleware/symlink/rake copy. Examples include Marksmith editor built as an engine, precompiled builds work reliably, and tradeoffs around fingerprinting and CI are spelled out.
AI-written summary · about
chapters (13)
- 0:00Welcome
- 1:07Why asset pipeline matters
- 2:29Problems solved
- 4:56Evolution of asset pipeline
- 7:22Current options
- 8:28Rails plugins with asset pipeline
- 9:55Import maps for gems
- 10:59Adding npm packages to gems
- 12:23Advanced JS compilation in gems
- 13:47Publishing npm packages for gems
- 14:35Unorthodox asset delivery
- 17:00Legacy and modern setups
- 18:23Key takeaways
related talks
20mMaster the Rails Asset Pipeline: Best Practices for Apps & Gems
24mPropshaft and the Modern Asset Pipeline
43mCrafting Rails Plugins
11mFrontend Joy in Ruby on Rails
59mRailsConf 2011, David Heinemeier Hansson
19mFrontend Meet Backend Get Along
17mWebpacker vs Asset Pipeline
34mStrong Practices for Rails Applications Continuous Delivery
