New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
redis gem 4+ incompatibility "Specified 'redis' for Action Cable pubsub adapter, but the gem is not loaded" #30527
Comments
We got this error too after bundle update. Might not be obvious to all how to diagnose from the error message - we did have gem 'redis' in our gemfile, just not the right version. |
same problem here, seems that AC doesn't have it's dependencies straight. |
I'm getting this today too, shall investigate further.
|
Can confirm that this happened to me as well. Rails Version 5.0.0.1. I tried running Redis 4.0 and received the error. When I moved back to ~> 3.3 then everything was fine and web sockets worked. |
I can also confirm that this issue persists in 5.1.4. As @rikkipitt discovered, the version constraint for the
Which causes this exception to be raised when using a 4.x version of the redis gem (4.0.0 was released August 25):
It would also be helpful for debugging if the exception being raised mentioned the specific constraint that wasn't satisfied (which should be present in the exception being caught) instead of saying the minimum required version wasn't met. I can start a PR, but some more testing may be required before the version constraint can be relaxed since this is a major version bump @maclover7 @matthewd |
@jeremy is taking care of the bump in #30748, but I agree the current exception is hiding too much information. It'd be good to improve that, if anyone's up for it. We should address the AR instance it was copied from at the same time: rails/activerecord/lib/active_record/connection_adapters/connection_specification.rb Line 188 in 813af46
|
any updates? versions: but when I try to downgrade redis to 3.3.3, heroku reject my commit.
how can i fix it? |
@Senegal - You probably need to run When you run a I think Heroku is rejecting because your Gemfile and Gemfile.lock have versions that do not mesh. If you fix that and then re-deploy, you should be good to go. |
I was getting the exception documented here: rails/rails#30527 Looks fixed but not yet deployed so I'm retreating to the older version of the redis gem. While I was at it, I also fixed an exception about not having the Popper lib for Bootstrap.
I was getting the exception documented here: rails/rails#30527 Looks fixed but not yet deployed so I'm retreating to the older version of the redis gem. While I was at it, I also fixed an exception about not having the Popper lib for Bootstrap.
Im experiencing the same problem! with Redis 4.0.1, I had to downgrade to 3.3.5 |
I had the same problem - @Xosmond temporary(?) solution worked for me as well. |
Action cable is not compatibile with v4 of the redis gem. See rails/rails#30527
Have the same problem, ruby - |
I had the same issue. |
@AnkIF Looks like v5.1.5 was released 2 days ago. |
seems like it doesn't backport to rails 5.0.7 (ruby 2.4.4) still having the same problem with redis 4 |
I didn't backport 3789531 to 5-0-stable because the build wasn't failing with the error that 5-1-stable was failing with. 5.0 is only supported for security fixes now so we're likely not going to backport this to 5.0. Our recommendation is to upgrade to 5.1. |
Same issue with Rails 5.0.5, Ruby 2.4 |
If you can't upgrade to 5.1 because you don't have time to rewrite a ton of old Paperclip code then locking your Redis gem to 3.3.1 makes ActionCable's myopic dependency declaration happy. If you're running something else that truly demands a 4.x.x then the only practical solution seems to be vendorizing ActionCable and fixing it yourself. |
Steps to reproduce
Using ActionCable 5.1.3 with the
redis
gem upgraded from 3.3.3 to 4.0.0 and attempting to broadcast on a channel seems to yield this exception:Going back to ~> 3.3 makes AC work again as expected.
Expected behavior
AC should work
Actual behavior
An exception is raised indicating the gem is not loaded, but it seems to be.
Going back to ~> 3.3 makes AC work again as expected.
System configuration
Rails version: 5.1.3
Ruby version: 2.4.1
The text was updated successfully, but these errors were encountered: