Upgrading a Rails App to Tailwind v4 - HYBRD
21-Feb-2025 17
Last week, I upgraded a client’s Rails app to Tailwind v4. I rarely delay upgrading dependencies, but after briefly looking through the release notes on Tailwind v4 when it first came out, I decided I would hold off for a bit on most of my projects. (I also tend to wait a bit on upgrading to a major release to until a few patch releases have come out.) For this modest-sized Rails app, the upgrade took me somewhere between 4-6 hours, mainly because I was struggling to figure out everything that changed, and how best to use the upgrade tool. If your setup is similar to ours, hopefully this will save you some time.
This post is going to be most relevant for Rails apps using Tailwind with PostCSS. If you’re using the tailwindcss-rails gem, you should read Rob Zolkos’ post and follow the upgrade section of the gem’s README.
But, no matter what your setup, you are going to need to read through the Tailwind Upgrade guide. Maybe even a couple times.
Upgrading a Rails App to Tailwind v4 - HYBRD #ruby #rubydeveloper #rubyonrails #Upgrading #Rails #Tailwind #HYBRD #tailwind https://rubyonrails.ba/link/upgrading-a-rails-app-to-tailwind-v4-hybrd