更新2.0.0后默认显示没有安装dalli
leiz-me opened this issue · comments
全部按照官方的配置进行,但是在启动的时候后台报没有安装dalli。
日志如下:
Started GET "/rucaptcha/" for 127.0.0.1 at 2017-01-25 22:51:50 +0800
Processing by RuCaptcha::CaptchaController#index as HTML
You don't have dalli installed in your application. Please add it to your Gemfile and run bundle install
Completed 500 Internal Server Error in 82ms (ActiveRecord: 0.0ms)
RuntimeError (Could not find cache store adapter for mem_cache_store (cannot load such file -- dalli)):
activesupport (5.0.0) lib/active_support/cache.rb:106:in rescue in retrieve_store_class' activesupport (5.0.0) lib/active_support/cache.rb:104:in
retrieve_store_class'
activesupport (5.0.0) lib/active_support/cache.rb:60:in lookup_store' rucaptcha (2.0.0) lib/rucaptcha/cache.rb:7:in
cache'
rucaptcha (2.0.0) lib/rucaptcha/controller_helpers.rb:22:in generate_rucaptcha' rucaptcha (2.0.0) app/controllers/ru_captcha/captcha_controller.rb:6:in
index'
actionpack (5.0.0) lib/action_controller/metal/basic_implicit_render.rb:4:in send_action' actionpack (5.0.0) lib/abstract_controller/base.rb:188:in
process_action'
我理解这个是默认存储在memcached里面。但是考虑到一般项目在开发过程中,可能有还没到使用memcached的阶段,这个时候是否可以配置不存储?
测试了一下,配置成:memory_store可以避免这个问题。