I'm using Heroku to host a simple Ruby on Rails test app to learn how to use Redis. I'm using RedisCloud as my Redis servis provider. Locally, I can inspect my Redis DBs using the Redis CLI, but how can I inspect the data in the RedisCloud DBs that my Heroku app is using?
RedisCloud provides a dashboard that shows stats, but not the actual data. Also, I've tried using the Redis Desktop Manager software, but it has too many bugs to allow me to remotely connect to my RedisCloud DBs.
Since you are using Rails you can also connect to the Rails console like this:
Once connected, you will have an initialized redis connection based on your configuration (eg. you have
$redis = Redis.new(url: ENV["REDISCLOUD_URL"])
in yourconfig/initializers/redis.rb
):Alternatively, you can make a new one:
Step by step:
1 - Check your Heroku config, in order to find out the REDIS URL.
You should see an entrance that look like this:
2 - Connect to your remote Redis DB using
redis-cli
:You should be able to query your Redis DB now.