Home>

The title will be almost all, but if I want to use Redis with Rails, etc.
Awareness that you need to write the redis endpoint in the yml file.

At this time, for example, it seems to be described as follows (this is the configuration file used when using ActinCable)

development:
  adapter: async
test: test:
  adapter: async
production:
  adapter: redis
  url:<% = ENV.fetch ("REDIS_URL") {"redis: // localhost: 6379/1"}%>
  channel_prefix: example_production

What does "redis:" mean here?

"// localhost: 6379/1"
If i look only here, you can understand that it is set to connect to port 6379 of the local host.
As soon as "redis:" is added at the beginning, I don't understand. ..
Does it represent some kind of protocol like "http:"?

Even if you check on the Web with conditions such as "Rails Redis settings", whether it is a part that is too basic
I couldn't find any literature that explains the details of this area ...

It would be very helpful if anyone could answer.

  • Answer # 1

    Does it represent some kind of protocol like "http:"?

    I think that recognition is good. It's a part called URL schema.

    https://qiita.com/blueplanet/items/b72be9dc349ec7f15cba