Closed tesssie closed 11 months ago
We no longer support Rails 4.2 or Redis 3.0, I am guessing the issues is related to the version of the redis gem and the interface for setting up redis... but can't really help on the out of support versions.
check and ensure your redis is up and running on the port you export... it looks like you are trying to connect to 127.0.0.1:6379
use Rails console to just see if you can establish a connection. If that is working the other thing to try is removing the prefix redis://
as we likely don't export or need that part of the url.
Yes I was able to connect to the redis. Now I fixed once i started moving this to ENV['COVERBAND_REDIS_URL'] to application.rb
if moving it to your application.rb fixed it that means the ENV wasn't set when the coverband initializer ran... I am guessing you are using something like figaro, or rails_dot_env to load your ENV vars which means they need to be loaded by the time coverband initializes... You might see some issues with a few files not being covered if you leave it in the application.rb due to load order issues... but it will mostly work. The better fix is to ensure your ENV vars are loaded before coverband.
See this section of the readme that talks about how to fix this env load ordering issue
https://github.com/danmayer/coverband#working-with-environment-variables
Describe the bug I am using coverband 5.2.1 with rails 4.2. I have configured coverband redis.
\nRedis::CannotConnectError (Error connecting to Redis on 127.0.0.1:6379 (Errno::ECONNREFUSED)):\n redis (3.3.5) lib/redis/client.rb:345:in
rescue in establish_connection'\n redis (3.3.5) lib/redis/client.rb:330:in
establish_connection'\n redis (3.3.5) lib/redis/client.rb:101:inblock in connect'\n redis (3.3.5) lib/redis/client.rb:293:in
with_reconnect'\n redis (3.3.5) lib/redis/client.rb:100:inconnect'\n redis (3.3.5) lib/redis/client.rb:364:in
ensure_connected'\n redis