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

Fix 'uninitialized constant BetterErrors::Middleware::VERSION' #480

Conversation

addisonmartin
Copy link
Contributor

@addisonmartin addisonmartin commented Oct 2, 2020

Due to the changes with CSRF_TOKEN_COOKIE_NAME, when using Better Errors version 2.8.2 I would get the following error:

~/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/core_ext/active_support.rb:61:in block in load_missing_constant': uninitialized constant BetterErrors::Middleware::VERSION (NameError) 56: from ~/Documents/MyProject/bin/rails:3:in

(Stack trace shorten for readability)

Downgrading to version 2.8.1 fixed the error. I believe the issue is that there is no constant named VERSION in the Middleware class, so the version number from the BetterErrors module should be used instead.

…ib/better_errors/middleware.rb by using BetterErrors::Version, not the nonexistent VERSION constant of Middleware.
@RobinDaugherty
Copy link
Member

Thank you @addisonmartin!

@RobinDaugherty RobinDaugherty changed the title Fixed 'uninitialized constant BetterErrors::Middleware::VERSION' in version 2.8.2 Fix 'uninitialized constant BetterErrors::Middleware::VERSION' Oct 3, 2020
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

Successfully merging this pull request may close these issues.

None yet

2 participants