skip to Main Content

I am having the mentioned error on a rails project, after I added the following line of code in the config/environments/development.rb

config.cache.store = :dalli_store

I am working on a personal project using Rails 4.2, installed on OS X 10.7.5. Also memcached 1.4.5 is installed an running in my computer. I don’t understand why this is happening. I want to use cache.store on my project but, I don’t know how to solve this problem. Any help will be well received !

2

Answers


  1. Please change:

    config.cache.store = :dalli_store
    

    to

    config.cache_store = :dalli_store
    
    Login or Signup to reply.
  2. Guide says Cache Stores

    Rails provides different stores for the cached data created by action and fragment caches.

    Configuration

    You can set up your application’s default cache store by calling config.cache_store = :dalli_store

    Alternatively, you can call ActionController::Base.cache_store outside
    of a configuration block.

    You can access the cache by calling Rails.cache

    The cache store has a bounded size specified by the :size options to the initializer (default is 32Mb).

    If you need to increase that then like below

    config.cache_store = :dalli_store, { size: 64.megabytes }
    

    And finally you written config.cache.store = :dalli_store that is wrong because Rails guide says config.cache_store

    If you need to know more about Rails 4.2 Caching then please visit Rails official document about Cach here

    Hope it helps

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search