appsignal-ruby
appsignal-ruby copied to clipboard
Fix undefined method `id' for nil:NilClass Redis Client
The Redis Client Integration does not have an instance variable named 'config' at this point. I changed it to 'id' like the other Redis integration and it worked for me. This change only resolves the error of undefined method 'id' for nil:NilClass.
Hi @scottpi! Could you let us know which redis
gem version you're using?
@unflxw
redis (4.8.0)
redis-client (0.11.2)
@scottpi That's a bit of an old version of redis-client. Can you upgrade the Gem? Our integration was written for newer gem versions.
If we decide to support older redis-client versions, it should also continue to work with newer versions.
well, using the lower version 3.4.8 worked for with rails 7 default setup.
This patch breaks on newer redis versions, so we can't merge it without breaking other setups. If you can, please upgrade your version of redis-client. Of course, you can also use your patched version of the integration if you can't upgrade redis-client.
Commenting here, since I ran into the same issue. That crashed our customers whole application and caused a downtime 🤒 It might be nice to add a minimum version requirement to the changelog, as nothing indicates which version is required :)
Just trying to prevent other people from making the same mistake, since it is pretty easily overlooked if you do not run redis in your dev setup.
I've created a fix for the error happening on older redis-client versions in https://github.com/appsignal/appsignal-ruby/pull/1058