rails / cssbundling-rails

Bundle and process CSS in Rails with Tailwind, PostCSS, and Sass via Node.js.
MIT License
579 stars 83 forks source link

7.0 upgrade issues with `assets:clobber` task #51

Closed holman closed 2 years ago

holman commented 2 years ago
› rails --trace
rails aborted!
Don't know how to build task 'assets:clobber' (See the list of available tasks with `rails --tasks`)
Did you mean?  assets:clean
/Users/holman/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/task_manager.rb:59:in `[]'
/Users/holman/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:405:in `[]'
/Users/holman/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/cssbundling-rails-1.0.0/lib/tasks/cssbundling/clobber.rake:8:in `<main>'
[snip]

This app was on 6.0 using tailwindcss-rails. Upgraded to 7.0 with rails app:update and started to re-install tailwind via the new cssbundling-rails approach but ran into this error.

Probably something simple I'm missing with my existing tailwind setup — I can't reproduce this on a fresh Rails app — but thought I'd mention it in case there's an issue with upgrading.

rmacklin commented 2 years ago

Could it be related to this change? sprockets-rails is no longer a dependency of rails; so if your app doesn't have an explicit sprockets-rails dependency, that gem may have been removed when you upgraded to rails 7.0 (the easiest way to check that would be looking at your Gemfile.lock's diff).

holman commented 2 years ago

Yup, that would indeed be it! (guides.rubyonrails.org hasn't been bumped to 7.0.0 yet and I didn't think to peek at the edge upgrade guides yet, either.)

Definitely a bit confusing on which underlying assets-related libraries are still being used or not being used or which is going to be changing post 7.0 and which aren't, hah. Still catching up with it yet. :) Thanks!

rmacklin commented 2 years ago

You're welcome!

Yeah, I noticed guides.rubyonrails.org was still on 6.1 when I was replying above. It seems to have just been updated, though!

image