If you get rails route error like this:
No route matches [GET] "/sign_out"
That’s because Devise uses HTTP DELETE to logout the session, but you will never be able to do this by clicking a link in a web page.
Then, just config your
config/initializers/devise.rb to use
# The default HTTP method used to sign out a resource. Default is :delete. config.sign_out_via = :get
Restart rails server.