-
Notifications
You must be signed in to change notification settings - Fork 144
Open
Description
Summary
Currently Hutch does not work with Rails 6 (rc1) out-of-the-box since the latter defaults to using Zeitwerk for autoloading paths.
Steps to Reproduce
- Generate a new Rails 6 application.
- Add
hutchas a dependency. - Create a consumer under
<rails_root>/app/consumers/foo_consumer.rb. - Ensure RabbitMQ is running.
- Run Hutch from the Rails root directory like so:
bundle exec hutch --autoload-rails
Expected Result
The output should include lines such as these:
2019-07-01T15:54:24Z 6 INFO -- found rails project (.), booting app in development environment
<...>
2019-07-01T15:54:24Z 6 INFO -- setting up queues
2019-07-01T15:54:24Z 6 INFO -- setting up queue: consumers:foo_consumer
Actual Result
The output looks more like this:
2019-07-01T15:47:48Z 6 INFO -- found rails project (.), booting app in development environment
<...>
2019-07-01T15:47:48Z 6 WARN -- no consumer loaded, ensure there's no configuration issue
2019-07-01T15:47:48Z 6 INFO -- setting up queues
Known Workaround
Add the following to <rails_root>/config/application.rb:
config.autoloader = :classicMetadata
Metadata
Assignees
Labels
No labels