require 'action_dispatch/middleware/session/abstract_store'
require 'rack/session/dalli'

module ActionDispatch
  module Session
    class MemCacheStore < Rack::Session::Dalli
      include Compatibility
      include StaleSessionCheck
      include SessionObject

      def initialize(app, options = {})
        require 'dalli'
        options[:expire_after] ||= options[:expires]
        super
      end
    end
  end
end

require 'action_dispatch/middleware/session/abstract_store'
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
    class MemCacheStore < Rack::Session::Dalli
      include Compatibility
      include StaleSessionCheck
      include SessionObject

      def initialize(app, options = {})
        options[:expire_after] ||= options[:expires]
        super
      end
    end
  end
end

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