提交 9c0ab33c 编写于 作者: G Guillermo Iguaran

Improve error message for memcache session store when dalli isn't loaded in app

上级 f6f40669
require 'action_dispatch/middleware/session/abstract_store'
require 'rack/session/dalli'
begin
require 'rack/session/dalli'
rescue LoadError => e
$stderr.puts "You don't have dalli installed in your application. Please add it to your Gemfile and run bundle install"
raise e
end
module ActionDispatch
module Session
......@@ -9,7 +14,6 @@ class MemCacheStore < Rack::Session::Dalli
include SessionObject
def initialize(app, options = {})
require 'dalli'
options[:expire_after] ||= options[:expires]
super
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册