What is the asset pipeline in Rails?

Answer

The asset pipeline (Sprockets in older Rails, now Propshaft/importmap in Rails 7+) manages and optimizes static assets (CSS, JavaScript, images). It: concatenates multiple files into one (reducing HTTP requests), compresses/minifies them (reducing file size), and adds fingerprinting (MD5 hash in filename) for cache busting. Asset paths in helpers (asset_path, image_tag) automatically use the fingerprinted URL. In production, assets are precompiled via rails assets:precompile to static files served directly by the web server.