Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Improve error message for memcache session store when dalli isn't loa…

…ded in app
  • Loading branch information...
commit 9c0ab33c2edf0a20769b32c326b09da17c54ae4e 1 parent f6f4066
@guilleiguaran guilleiguaran authored
View
8 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 @@ class MemCacheStore < Rack::Session::Dalli
include SessionObject
def initialize(app, options = {})
- require 'dalli'
options[:expire_after] ||= options[:expires]
super
end
Please sign in to comment.
Something went wrong with that request. Please try again.