Frontend Assets in Ruby on Rails Through the Years

25-Jul-2025 20
As a Ruby on Rails developer at a consulting agency who works with a wide variety of legacy apps, there have been many times where I need to change the JavaScript or CSS in use on the site and have to start by figuring out where those assets are currently coming from and how they are getting where they need to go. Rails is all about convention over configuration, so there has typically been a "right answer" at any given time about how things like JavaScript and CSS work in a Rails app. But "the Rails way" of handling assets has changed a lot over the years, and it's all too common for a major version upgrade of a legacy app to stop short of upgrading the asset management strategy to what's recommended by that next major version of Rails - meaning knowing you're on a certain version of Rails doesn't guarantee that the Rails Guides relating to asset management for that version of Rails reflect what's actually happening in the legacy app you've been asked to maintain or make changes to. After running into this problem a few times I decided to do a deep dive into Rails asset management strategies over the years, and make a reference for myself to guide me towards what asset management patterns are in use in any given Rails app I might encounter. And, I wanted to get a better sense of what the currently recommended patterns are, so I can make stronger recommendations about which upgrades to pursue.
Use coupon code:

RUBYONRAILS

to get 30% discount on our bundle!
Prepare for your next tech interview with our comprehensive collection of programming interview guides. Covering JavaScript, Ruby on Rails, React, and Python, these highly-rated books offer thousands of essential questions and answers to boost your interview success. Buy our 'Ultimate Job Interview Preparation eBook Bundle' featuring 2200+ questions across multiple languages. Ultimate Job Interview Preparation eBook Bundle