Skip to content

Commit 3bad387

Browse files
justin808claude
andcommitted
Fix rake task loading in Rails engine
- Changed from Dir.glob pattern to explicit file loading in rake_tasks block - This ensures all React on Rails rake tasks are properly loaded in test environment - Should resolve "Don't know how to build task 'react_on_rails:generate_packs'" error 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent aa22d8d commit 3bad387

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/react_on_rails/engine.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ class Engine < ::Rails::Engine
1010
end
1111

1212
rake_tasks do
13-
path = File.join(File.dirname(__FILE__), "..", "tasks", "*.rake")
14-
Dir[path].each { |f| load f }
13+
load File.expand_path("../tasks/generate_packs.rake", __dir__)
14+
load File.expand_path("../tasks/assets.rake", __dir__)
15+
load File.expand_path("../tasks/locale.rake", __dir__)
1516
end
1617
end
1718
end

0 commit comments

Comments
 (0)