#destroy needs to be implemented in Rails 3
I get an exception using this gem with mongoid on Rails 3
actionpack (3.0.10) lib/action_dispatch/middleware/session/abstract_store.rb:252:in destroy' actionpack (3.0.10) lib/action_dispatch/middleware/session/abstract_store.rb:105:indestroy'
Which if you look at: https://github.com/rails/rails/blob/master/actionpack/lib/action_dispatch/middleware/session/abstract_store.rb
Can see why
def destroy_session(env, sid, options) raise '#destroy_session needs to be implemented.' end
If you are using Rails 3 I recommend just using https://github.com/titanous/mongo-store
module ActionDispatch module Session class MongoRailsStore < Rack::Session::Mongo def initialize app, options super end end end end