You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello. 馃憢 I'm experiencing an issue where I'm seeing a bunch of warnings in my console (dev and test) when using Rodauth in my Rails app:
/Users/bkuhlmann/.cache/frum/versions/3.1.3/lib/ruby/gems/3.1.0/gems/rodauth-model-0.2.1/lib/rodauth/model/active_record.rb:69: warning: already initialized constant Account::VerificationKey
/Users/bkuhlmann/.cache/frum/versions/3.1.3/lib/ruby/gems/3.1.0/gems/rodauth-model-0.2.1/lib/rodauth/model/active_record.rb:69: warning: previous definition of VerificationKey was here
/Users/bkuhlmann/.cache/frum/versions/3.1.3/lib/ruby/gems/3.1.0/gems/rodauth-model-0.2.1/lib/rodauth/model/active_record.rb:69: warning: already initialized constant Account::RememberKey
/Users/bkuhlmann/.cache/frum/versions/3.1.3/lib/ruby/gems/3.1.0/gems/rodauth-model-0.2.1/lib/rodauth/model/active_record.rb:69: warning: previous definition of RememberKey was here
/Users/bkuhlmann/.cache/frum/versions/3.1.3/lib/ruby/gems/3.1.0/gems/rodauth-model-0.2.1/lib/rodauth/model/active_record.rb:69: warning: already initialized constant Account::PasswordResetKey
/Users/bkuhlmann/.cache/frum/versions/3.1.3/lib/ruby/gems/3.1.0/gems/rodauth-model-0.2.1/lib/rodauth/model/active_record.rb:69: warning: previous definition of PasswordResetKey was here
/Users/bkuhlmann/.cache/frum/versions/3.1.3/lib/ruby/gems/3.1.0/gems/rodauth-model-0.2.1/lib/rodauth/model/active_record.rb:69: warning: already initialized constant Account::LoginChangeKey
/Users/bkuhlmann/.cache/frum/versions/3.1.3/lib/ruby/gems/3.1.0/gems/rodauth-model-0.2.1/lib/rodauth/model/active_record.rb:69: warning: previous definition of LoginChangeKey was here
Steps to Recreate
I'm afraid I don't have a quick way to reproduce this for you in an isolated environment but can try to do that if it'd help. I mostly wanted to report this in case you weren't aware. As a workaround, I can use the excellent Warning gem to workaround these issues.
Thanks for reporting. The only way I can see this happening is if your Account model is being loaded twice, which is likely to cause other issues/warnings anyway. I suggest you try to figure out why/if your model is being loaded multiple times.
Does it happen during code reloading, i.e. when you change files in your project? I know Zeitwerk is supposed to unload the Account constant before loading the file again, so this problem shouldn't appear. I couldn't reproduce this warning on the demo app.
Hey Janko, thanks. 馃檱 I'm finding this hard to track down at the moment so believe this issue is more obscure than I realized. I think you are right that there is something I'm not seeing in the application which is causing this to happen. I'm going to close this issue since there is no reason to hold you up on this. If I am able to detect the root cause -- and it's actionable -- I can reopen this issue.
Overview
Hello. 馃憢 I'm experiencing an issue where I'm seeing a bunch of warnings in my console (dev and test) when using Rodauth in my Rails app:
Steps to Recreate
I'm afraid I don't have a quick way to reproduce this for you in an isolated environment but can try to do that if it'd help. I mostly wanted to report this in case you weren't aware. As a workaround, I can use the excellent Warning gem to workaround these issues.
Environment
The text was updated successfully, but these errors were encountered: