-
-
Notifications
You must be signed in to change notification settings - Fork 210
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Sidekiq fails to start when RAILS_ENV=production is set after upgrading to Rails 7 and using turbo-rails-1.0.0 #30
Comments
The scope of this issue has changed since its creation. It's now an issue with
Perhaps this has to do with lazy loading modules in development vs pre-loading modules in production? At least it happens in both environments now. Question is whether this is a turbo-rails, sidekiq, Rails 7 or a user issue. From my end all I did was execute a default Rails 7 mailer through Active Job using |
Same problem here. Any known workaround? |
I think the best we can hope for now is to mention it's happening in hotwired/turbo-rails#285 and monitor that issue until a resolution is found. Attempting to fix this one is above my pay grade. |
Same problem w/ an older application I'm trying to move to Rails7. I did spot this, this morning - thinking it may have resolved things But, even after getting zeitwerk 2.5.2 installed, it does not resolve the symptom for me (even if I turn off bootsnap in my case). Alike the OP, I can successfully find and call my class from IRB - and the dir can be found from bash within the docker container that is running sidekiq - so it's there. |
I also upgraded zeitwerk to 2.5.2 but I'm seeing the same issue as with 2.5.1. Thanks for linking that. I'm not sure if that issue is 100% related but hopefully having it linked will help address this one. |
This is currently fixed on the main branch based on ed7e99c. I'm still going to leave this open until it's properly fixed in the related repo(s) since the current fix might be a workaround, although it feels completely reasonable to do. I'm not sure what would cause needing to do this now but not in previous versions of Rails or Zeitwerk. |
The root cause has been found by the creator of Zeitwerk. He wrote up a great explanation of everything here: hotwired/turbo-rails#285 (comment) The TL;DR is it's not a bug, it's more so a documentation issue with Bundler and that using the Rails also been patched for 7.0.1 which will delay loading Zeitwerk just a little bit to make things work how they did before but technically you should use |
Edit: The scope of this issue has changed to affect every Active Job running through Sidekiq and it also affects all environments. The first reply to this issue has more details. I left the original issue here for extra context which is still worth reading.
Sidekiq starts successfully with
RAILS_ENV=development
, but fails to start withRAILS_ENV=production
.Here's the stack trace:
If I
exec
into theworker
container I'm able tostat /usr/local/bundle/gems/turbo-rails-1.0.0/app/channels/turbo/streams
which returns back that the directory does exist as seen below:What's weird is the error mentions
cannot load such file
but that path it not a file, it's a directory on disk.What's also interesting is the
web
,worker
andcable
containers that run all use an identical Dockerfile and the only difference is the command that gets run (such as puma or sidekiq). Both theweb
andcable
containers come up fine. It's onlyworker
that fails.Running the same stat command in the
web
andcable
containers produce the same output.The text was updated successfully, but these errors were encountered: