1

I'm searching and trying for hours now, but I can't find a solution.

I need a way to kill all User Sessions so they have to log in again. I looked at the SO Answers, but somehow nothing wants to work. The most popular being:

rake db:sessions:clear

which throws a

Don't know how to build task 'db:sessions:clear'.

What am I missing, has someone a good solution for this?

What I need basically is something like a task, or console wizardry to Kill All Sessions on Devise.


Devise Session Controller

How can I reset all devise sessions so every user has to login again?

Jason Aller
  • 3,541
  • 28
  • 38
  • 38
Mini John
  • 7,855
  • 9
  • 59
  • 108
  • Maybe you could create a function with the devise session helper : user_session, [devise](https://github.com/plataformatec/devise), something like user_session = nil. – AME May 05 '14 at 11:21

1 Answers1

4

change the key in config/session_store.rb

MyAppName::Application.config.session_store :cookie_store, key: '_myapp_name_session'

I changed it from _myapp_name_session to _myapp_name_sessions and all users are loged out.

reminder: Be sure to restart your server when you modify this file.

rmagnum2002
  • 11,341
  • 8
  • 49
  • 86