My rails app is hosted with heroku and they recently updated the redis version my app was using from 4.0.14 to 6.2. This has caused some bugs to start appearing of the following nature:
OpenSSL::SSL::SSLErrorSSL_connect returned=1 errno=0 peeraddr=108.128.159.63:20459 state=error: certificate verify failed (self signed certificate in certificate chain)
From other stackoverflow articles (eg. Herkou Redis - certificate verify failed (self signed certificate in certificate chain)) I've updated my config for config/initializers/redis.rb
:
if Rails.env.test? require "mock_redis" REDIS = MockRedis.newelse REDIS = Redis.new(url: ENV["REDIS_URL"], ssl_params: { verify_mode: OpenSSL::SSL::VERIFY_NONE })end
and have also updated config/cable.yml
to:
development: adapter: asynctest: adapter: testproduction: adapter: redis url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %> channel_prefix: good_gym_production ssl_params: verify_mode: <%= OpenSSL::SSL::VERIFY_NONE %>
To try and specify that no verification is needed, but this hasn't worked so far. Any ideas would be much appreciated.