Closed richardTowers closed 2 years ago
May I ask how you get your assets served if not through sprockets or propshaft?
May I ask how you get your assets served if not through sprockets or propshaft?
I didn't actually get that far - I am planning on using sprockets (although I might have a look at propshaft now).
I stumbled across this while upgrading a rails 6 app. The process was something like:
rake --tasks
Rails 7 dropped the dependency on Sprockets as well. So I accidentally removed the transient dependency on Sprockets when I upgraded rails and removed sass-rails. I wasn't actually trying to live without sprockets / propshaft.
I'm seeing a problem running
rake --tasks
in a rails 7 project which has cssbundling-rails as a dependency but not sprockets.with --trace
``` % ▶ rake --tasks --trace rake aborted! Don't know how to build task 'assets:precompile' (See the list of available tasks with `rake --tasks`) /Users/richardtowers/.asdf/installs/ruby/3.0.1/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/task_manager.rb:59:in `[]' /Users/richardtowers/.asdf/installs/ruby/3.0.1/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:405:in `[]' /Users/richardtowers/.asdf/installs/ruby/3.0.1/lib/ruby/gems/3.0.0/gems/cssbundling-rails-1.0.0/lib/tasks/cssbundling/build.rake:10:in `Note: I'm not trying to run
assets:precompile
- the error is thrown byrake --tasks
.The trace calls out
build.rake:10
which looks like it assumes theassets:precompile
task will exist.Adding
gem "sprockets-rails"
to my Gemfile fixes the issue, but a749ca29 suggests that "Sprockets is not a dependency", so I think this is a bug.I can have a go at a PR...