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

NameError: uninitialized constant GovukComponentsHelper #58

Closed
aliuk2012 opened this issue Sep 15, 2020 · 3 comments · Fixed by #62
Closed

NameError: uninitialized constant GovukComponentsHelper #58

aliuk2012 opened this issue Sep 15, 2020 · 3 comments · Fixed by #62
Labels
bug Something isn't working

Comments

@aliuk2012
Copy link
Contributor

I've been trying to add govuk-components to another rails service and came across this issue while trying to deploy the app to production. Everything seems to work and run correctly in development. I'm not sure if perhaps its a config setting in the rails app that is making the server fail when it starts up.

DFE-Digital/get-help-with-tech#466 (comment)

@peteryates peteryates added the bug Something isn't working label Sep 15, 2020
@peteryates
Copy link
Member

Interesting. I can recreate locally by changing config.load_defaults from 5.2 and 6.0 as you say in the referenced ticket.

It would appear that between the two versions of Rails, something has changed in the way helpers are loaded. There's more info here, I'll have a closer look over the next day or two.

@peteryates
Copy link
Member

Scratch the above, the helper module is called GovukComponentHelper (singular) and the file is govuk_components_helper.rb (plural), that's probably the cause. I'll fix it tomorrow.

@aliuk2012
Copy link
Contributor Author

I was wondering if it was because of the filename here https://github.com/DFE-Digital/govuk-components/blob/master/app/helpers/govuk_component**s**_helper.rb but inside the file the module is GovukComponentHelper

peteryates added a commit that referenced this issue Sep 16, 2020
The switch from GovukComponentHelper to GovukComponentsHelper was
incomplete and caused problems when booting the app in production mode

Fixes #58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants