The asset pipeline was introduced in Rails 3.1 (I believe) and has been a controversial addition ever since. I’ve gone through stages of hating it and stages of wondering how I ever managed without it.
The biggest initial problem with it is that it’s just confusing till you get your head around what’s going on.
Why can’t you find that image?
Where did that font go?
The asset pipeline is a pre-processor for your assets. What lives in app/assets gets compiled – either on the fly in development mode or on deployment (usually) in production mode. And it’s in production mode where it really shines.
The clever bit comes when a file has changed. When the assets are compiled, this changes the digest on the filename. So while your browser previously loads /assets/application-abc123.js and cached it, now it’s being instructed to load /assets/application-def456.js – a file which it’s never seen before, so it downloads it and caches that one for the future too.
So that’s the assets side of things. What about the pipeline?
So there you have it – at first it looks confusing and it can be annoying at times, but the asset pipeline makes a real difference to your apps when they’re live so should be embraced whenever possible.