Skip to content

How to configure custom features with Rails 7.1 + Zeitwerk #256

Answered by janko
renchap asked this question in Q&A
Discussion options

You must be logged in to vote

I'm assuming you're getting this error with the new config.autoload_lib setting. The way to make Zeitwerk happy is move the feature to lib/rodauth/verify_account_forever_grace.rb. This satisfies Zeitwerk's file naming requirements, because Rodauth internally defines a Rodauth::VerifyAccountForeverGrace module.

Because it's not in rodauth/features/* directory that Rodauth will automatically require from, you just need to manually require "rodauth/verify_account_forever_grace" before enabling the feature. But I'm assuming you're already doing that 🙂 It seems that code reloading for this file still works even if you manually require it.

I will add these instructions to the wiki page.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@renchap
Comment options

Answer selected by renchap
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants