Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Admin namespace stops being autovivified after some reloads #38365

Closed
fxn opened this issue Feb 1, 2020 · 4 comments
Closed

Admin namespace stops being autovivified after some reloads #38365

fxn opened this issue Feb 1, 2020 · 4 comments

Comments

@fxn
Copy link
Member

fxn commented Feb 1, 2020

[Opening a new issue with the contents of this comment.]

Having eliminated all helpers with a name starting with admin_, I am still intermittently seeing this problem. Below is a file with the output with Rails.autoloaders.log! enabled.

The exception occurs at line 556. The file that is causing the exception contains the following:

module Admin::ProfessionalContactsHelper
end

This occurs intermittently when I start rails console. It can also happen in a rspec test, but if I stop spring and rerun the test it is fixed.

I am not sure if it is related, but I am also having another issue with the loading process.

temp_zeitwert.txt

@fxn
Copy link
Member Author

fxn commented Feb 1, 2020

@obromios which version of Ruby, Rails, and Zeitwerk?

The log that you attached has several reloads. Would it be possible to get a clean log when you start the console and this happens, for example? Or maybe you can trigger one doing

bin/rails runner Admin::ProfessionalContactsHelper

?

@obromios
Copy link

obromios commented Feb 3, 2020

I have tried
bin/rails runner Admin::ProfessionalContactsHelper
and it does give
uninitialized constant Admin
but I do not see any output from autoloaders.log. I do have this turned on, because when I run rails s I do see the autoloader.log output. I have checked the development.log and there is no autoloader output there either.

@fxn
Copy link
Member Author

fxn commented Feb 3, 2020

That is something, you should see traces in stdout.

Can we try with spring disabled just in case?

spring stop
export DISABLE_SPRING=1

@obromios
Copy link

obromios commented Feb 3, 2020

I did forget to restart spring, so that fixed the lack of autoloaders.log output. It also fixed the uninitialized constant Admin exception. See attached file:
temp_admin.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants