Our Rails App Talking to Redis
Although it’s great that we’ve started up a Redis server using Compose, it’s not much use to us by itself. The whole point of running the Redis server is so our Rails app can talk to it and use it as a key-value store. So let’s connect our Rails app to Redis and actually use it for something. Sound like fun?
Now, there are a million ways an app might want to use Redis. For our purposes, though, we don’t really care what we use Redis for; we care more about how to use it. We’re going to use an intentionally basic example: our Rails app will simply store and retrieve a value. However, keep the larger point in mind—once you know how to set up the Rails app to talk to the Redis server in a container, you can use it ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access