Introducing Dragonfly Cloud! Learn More

Error: could not find cache store adapter for redis_cache_store

What's Causing This Error

The error 'could not find cache store adapter for redis_cache_store' pops up when Rails is unable to locate the Redis cache store adapter that should have been loaded. The problem can be caused by various factors, including:

  1. Missing dependencies: If the Redis gem is not installed or not included in the Gemfile, Rails will not recognize Redis as a cache store adapter.

  2. Wrong configuration: If the Redis configuration is incorrect, such as the host or port number being wrong, Rails cannot connect to Redis and therefore won't recognize it as a cache store adapter.

  3. Compatibility issues: Different versions of Redis and the Redis gem may not be compatible, causing the adapter to fail to load.

Solution - Here's How To Resolve It

To fix the 'could not find cache store adapter for redis_cache_store' error, try these solutions:

  1. Install the Redis gem: Make sure the Redis gem is installed and included in your Gemfile by adding gem 'redis' to your Gemfile and running bundle install.

  2. Check Redis configuration: Ensure that the Redis configuration in your config/application.rb or config/environments/*.rb files is correct, including the host and port number. You can also check if Redis is running and accessible using the Redis CLI.

  3. Check Redis and Redis gem compatibility: Check the Redis gem documentation to ensure that the version of Redis you're using is compatible with the version of the Redis gem you've installed. You can also try upgrading the Redis gem to the latest version, or downgrading it to a known working version.

Was this content helpful?

Start building today 

Dragonfly is fully compatible with the Redis ecosystem and requires no code changes to implement.