Closed
Description
Rake task files that define methods end up in a global namespace, which means that cssbundling-rails and jsbundling-rails now conflict as they both define build_command
.
To reproduce the issue, have a project with both cssbundling-rails
and jsbundling-rails
in it.
± rails css:build
yarn install v1.22.19
[1/4] 🔍 Resolving packages...
success Already up-to-date.
✨ Done in 0.05s.
From: /Users/chris/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/cssbundling-rails-1.3.0/lib/tasks/cssbundling/build.rake @ line 12 :
7: end
8: end
9:
10: desc "Build your CSS bundle"
11: build_task = task :build do
=> 12: binding.irb
13: command = build_command
14: unless system(command)
15: raise "cssbundling-rails: Command build failed, ensure `#{command}` runs without errors"
16: end
17: end
irb(main):001:0> method(:build_command)
=> #<Method: Object#build_command() /Users/chris/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/jsbundling-rails-1.2.0/lib/tasks/jsbundling/build.rake:27>
Metadata
Metadata
Assignees
Labels
No labels