# #112 Devise finally works with Rails 7 and Turbo, but with a twist

- URL: https://superails.com/posts/rails-7-112-devise-finally-works-with-rails-7-and-turbo-but-with-a-twist
- Published: 2023-02-16
- Duration: 06:01
- Access: free
- Topics: devise, devise rails 7, rails authentication

As I recently mentioned, Devise has been finally patched to work with Rails 7 out of the box.
But when I tried installing it, I had a few minor issues:
- remember to use MAIN branch of devise
- re-generate the devise.rb initializer, or add these lines to it:

```
  config.responder.error_status = :unprocessable_entity
  config.responder.redirect_status = :see_other
```

Episode source code with comments: https://github.com/corsego/112-rails-7-devise-patch/commit/4717a4a6e12bb292b5515e97ce980d0c17751af7#
The devise patch: https://github.com/heartcombo/devise/pull/5548

0:00 Devise Drama queens
01:00 Install Devise
2:21 Check if Devise works (it doesn't)
2:46 Make devise work (add config.responders)
5:10 Link to sign out
5:43 Summary

## Chapters

- 0:00 Devise Drama queens
- 01:00 Install Devise
- 2:21 Check if Devise works (it doesn't)
- 2:46 Make devise work (add config.responders)
- 5:10 Link to sign out
- 5:43 Summary
