-
Notifications
You must be signed in to change notification settings - Fork 345
Gem Load Error is: undefined method `to_prepare' for ActionDispatch::Callbacks:Class #223
Comments
to_prepare is deprecated in Rails 5.1. I'm sorry I don't have a solution, but this is why you are getting this error. This gem hasn't been updated in a bit. |
@maynardewm No problem, I was able to write my own method to limit concurrent sessions in devise. Is there any room for maintainers? I'd love to help bring this gem up to date with rails 5.1 |
@nynhex How did you solve this issue? Can you post here your solution please? |
In case anyone has the same issue, this is what I did, till it gets upgraded to Rails 5.1. In the console, at your application root:
It should work fine then! |
@MohamedBrary @nynhex I read the newest code, the deprecated was fixed. So, I just add the link to GitHub repo. Like below
Is It Okay? It works fine for me. @MohamedBrary I don't think your solution will resolve the problem on production. |
I think the code is running well in master branch. Why don't we release it to ruby gem? |
@MohamedBrary, whomever you are, bless you! |
The error appear when i use this gem with Rails 6.0.3.1. Please fix it. Bundler could not find compatible versions for gem "railties": In Gemfile:
|
Everyone above issue is fixed already. It can run with Rails 6.0.3 now. Thanks! |
The most recent fix: bec97d5#diff-ccd0262315867a38631692fd09ec4768a909c4e5a47fe81a58a21a5f1eb0922f broke it for early rails versions (we are on 5.2.4.3)
@hoangth,
be enough for this use case? |
@ntli239 Oh my god. That is my mistake. I'm so sorry. |
Any updates on that? For the time being I have forked the repo and I am using my forked version. Seems to be working fine. |
The devise_security_extension bundles fine, but the install command fails with the following stack trace.
Rails:
5.1
Ruby:2.4.1
rails generate devise_security_extension:install
The text was updated successfully, but these errors were encountered: