I tried using redis-client on heroku, and ran into some issues.
Heroku uses redis URLs that do not have a username. They look like rediss://:password@host:6379
According to the redis docs the implicit username is default.
However, when I call RedisClient.config(url: 'rediss://:password@host:6379') I get the username set to password, and not default. This causes the subsequent redis auth to fail.
I don't know the history there, but it seems like uri.user.empty? ? 'default' : uri.user might make more sense. (I'm not sure what the preferred style is there, and if it needs to be defensive for nil)
I (and future searchers) can work around this by manually specifying the URL. In my Heroku setup, I use:
I tried using
redis-client
on heroku, and ran into some issues.Heroku uses redis URLs that do not have a username. They look like
rediss://:password@host:6379
According to the redis docs the implicit username is
default
.However, when I call
RedisClient.config(url: 'rediss://:password@host:6379')
I get the username set topassword
, and notdefault
. This causes the subsequent redis auth to fail.I assume this is because of https://github.com/redis-rb/redis-client/blob/81460ca38fa85f97f0dc97802d919bc773ec07a7/lib/redis_client/config.rb#L125
I don't know the history there, but it seems like
uri.user.empty? ? 'default' : uri.user
might make more sense. (I'm not sure what the preferred style is there, and if it needs to be defensive fornil
)I (and future searchers) can work around this by manually specifying the URL. In my Heroku setup, I use: