diff options
-rw-r--r-- | actionpack/lib/action_dispatch/middleware/session/mem_cache_store.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/session/mem_cache_store.rb b/actionpack/lib/action_dispatch/middleware/session/mem_cache_store.rb index 14af7eef68..b4d6629c35 100644 --- a/actionpack/lib/action_dispatch/middleware/session/mem_cache_store.rb +++ b/actionpack/lib/action_dispatch/middleware/session/mem_cache_store.rb @@ -1,5 +1,10 @@ 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 @@ module ActionDispatch include SessionObject def initialize(app, options = {}) - require 'dalli' options[:expire_after] ||= options[:expires] super end |