Junior Track Roadmap

Asset pipeline: Propshaft

Propshaft is the default asset pipeline in Rails 8, and this course reads its installed source alongside one Rails app. It shows how a content hash in the filename makes a URL safe to cache for a year. The lessons cover the load path, assets served on request in development, url() rewriting in CSS, and the split with importmap-rails. They also cover the dynamic and static resolvers and assets:precompile in a Dockerfile. The last lesson traces tailwind.css from source to URL and ends with a Ruby challenge.

What you'll learn

  • ✓How fingerprinted filenames let browsers cache assets safely
  • ✓How Propshaft builds its load path from app/assets and gem directories
  • ✓How Propshaft::Server serves and digests assets on request in development
  • ✓How CSS url() references are rewritten and how importmap-rails maps JavaScript modules
  • ✓How Propshaft picks between the dynamic and static resolvers
  • ✓How assets:precompile writes the manifest used in production
Free preview · Lesson 1 3 min read

One job: turn a source file into a cacheable URL

Every stylesheet and script a browser loads needs a URL, and that URL has one hard job: telling the browser how long it can keep the file without asking the server again. Get it wrong one way, and every visitor downloads the same unchanged CSS on every request, wasting bandwidth and time. Get it…

Read the full lesson free →

Curriculum

7 lessons
Type to start searching...