Closed ujh closed 5 months ago
Well that's not good. We may be able to do something to delay loading that monkeypatch until after the Devise Rails engine loads:
https://github.com/heartcombo/devise/blob/main/lib/devise/rails.rb
I won't have time to work on this for probably close to a week so if you want to take a crack at it feel free! Thanks for reporting
It's not a big deal, as the fix is easy and now documented.
I spent a few minutes looking into it, and it's possible to reproduce the error in CI when you switch the order of the gems there, too. I then ran out of time and couldn't fix the actual issue.
Here's the work in progress: https://github.com/ujh/devise-passwordless/pull/1
Not sure when I'll get around to looking at it again.
In the end the fix was a simple require "devise"
.
While upgrading to v1 (thanks for all the work, BTW!) I ran into the following error:
In the end I was able to track it down to the ordering of the gems and the monkeypatching of the devise controller helpers.
The error occurs when the I order the gems in the
Gemfile
like that:And goes away, when devise is being loaded first.
Alternatively, I can make the error go away when I comment out the part of
monkeypatch.rb
that adds a method toDevise::Controllers::Helpers
.