Skip to content

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

Merged
RobinDaugherty merged 1 commit intoBetterErrors:masterfrom
addisonmartin:fix-uninitialized-constant-BetterErrors-Middleware-VERSION
Oct 3, 2020
Merged

Fix 'uninitialized constant BetterErrors::Middleware::VERSION'#480
RobinDaugherty merged 1 commit intoBetterErrors:masterfrom
addisonmartin:fix-uninitialized-constant-BetterErrors-Middleware-VERSION

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.

2 participants