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

Version 2.8.2 breakage #482

Closed
thomasbalsloev opened this issue Oct 2, 2020 · 6 comments
Closed

Version 2.8.2 breakage #482

thomasbalsloev opened this issue Oct 2, 2020 · 6 comments

Comments

@thomasbalsloev
Copy link

thomasbalsloev commented Oct 2, 2020

Hi.

After updating the Better Errors gem to the latest version I get exceptions while loading our Rails app.
We use Rails 6.0.3.3 with ruby 2.6.6 and Puma 5.0.2.
The Puma workers are not loading caused by this exeception:

/usr/local/rvm/rubies/ruby-2.6.6/lib/ruby/gems/2.6.0/gems/better_errors-2.8.2/lib/better_errors/middleware.rb:43:inclass:Middleware': uninitialized constant BetterErrors::Middleware::VERSION (NameError)
from /usr/local/rvm/rubies/ruby-2.6.6/lib/ruby/gems/2.6.0/gems/better_errors-2.8.2/lib/better_errors/middleware.rb:28:in <module:BetterErrors>' from /usr/local/rvm/rubies/ruby-2.6.6/lib/ruby/gems/2.6.0/gems/better_errors-2.8.2/lib/better_errors/middleware.rb:7:in <top (required)>'
from /usr/local/rvm/rubies/ruby-2.6.6/lib/ruby/gems/2.6.0/gems/better_errors-2.8.2/lib/better_errors.rb:9:in <top (required)>' from /usr/local/rvm/rubies/ruby-2.6.6/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/runtime.rb:74:in require'
from /usr/local/rvm/rubies/ruby-2.6.6/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/runtime.rb:74:in block (2 levels) in require' from /usr/local/rvm/rubies/ruby-2.6.6/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/runtime.rb:69:in each'
from /usr/local/rvm/rubies/ruby-2.6.6/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/runtime.rb:69:in block in require' from /usr/local/rvm/rubies/ruby-2.6.6/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/runtime.rb:58:in each'
from /usr/local/rvm/rubies/ruby-2.6.6/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/runtime.rb:58:in require' from /usr/local/rvm/rubies/ruby-2.6.6/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler.rb:174:in require'
from /var/www/portal/config/application.rb:13:in <top (required)>' from /var/www/portal/config/environment.rb:2:in require'
from /var/www/portal/config/environment.rb:2:in <top (required)>' from config.ru:3:in require'
from config.ru:3:in block in <main>' from /usr/local/rvm/rubies/ruby-2.6.6/lib/ruby/gems/2.6.0/gems/rack-2.2.3/lib/rack/builder.rb:116:in eval'
from /usr/local/rvm/rubies/ruby-2.6.6/lib/ruby/gems/2.6.0/gems/rack-2.2.3/lib/rack/builder.rb:116:in new_from_string' from /usr/local/rvm/rubies/ruby-2.6.6/lib/ruby/gems/2.6.0/gems/rack-2.2.3/lib/rack/builder.rb:105:in load_file'
from /usr/local/rvm/rubies/ruby-2.6.6/lib/ruby/gems/2.6.0/gems/rack-2.2.3/lib/rack/builder.rb:66:in parse_file' from /usr/local/rvm/rubies/ruby-2.6.6/lib/ruby/gems/2.6.0/gems/puma-5.0.2/lib/puma/configuration.rb:330:in load_rackup'
from /usr/local/rvm/rubies/ruby-2.6.6/lib/ruby/gems/2.6.0/gems/puma-5.0.2/lib/puma/configuration.rb:256:in app' from /usr/local/rvm/rubies/ruby-2.6.6/lib/ruby/gems/2.6.0/gems/puma-5.0.2/lib/puma/runner.rb:141:in app'
from /usr/local/rvm/rubies/ruby-2.6.6/lib/ruby/gems/2.6.0/gems/puma-5.0.2/lib/puma/runner.rb:148:in start_server' from /usr/local/rvm/rubies/ruby-2.6.6/lib/ruby/gems/2.6.0/gems/puma-5.0.2/lib/puma/cluster.rb:289:in worker'
from /usr/local/rvm/rubies/ruby-2.6.6/lib/ruby/gems/2.6.0/gems/puma-5.0.2/lib/puma/cluster.rb:171:in block in spawn_worker' from /usr/local/rvm/rubies/ruby-2.6.6/lib/ruby/gems/2.6.0/gems/puma-5.0.2/lib/puma/cluster.rb:171:in fork'
from /usr/local/rvm/rubies/ruby-2.6.6/lib/ruby/gems/2.6.0/gems/puma-5.0.2/lib/puma/cluster.rb:171:in spawn_worker' from /usr/local/rvm/rubies/ruby-2.6.6/lib/ruby/gems/2.6.0/gems/puma-5.0.2/lib/puma/cluster.rb:153:in block in spawn_workers'
from /usr/local/rvm/rubies/ruby-2.6.6/lib/ruby/gems/2.6.0/gems/puma-5.0.2/lib/puma/cluster.rb:146:in times' from /usr/local/rvm/rubies/ruby-2.6.6/lib/ruby/gems/2.6.0/gems/puma-5.0.2/lib/puma/cluster.rb:146:in spawn_workers'
from /usr/local/rvm/rubies/ruby-2.6.6/lib/ruby/gems/2.6.0/gems/puma-5.0.2/lib/puma/cluster.rb:217:in check_workers' from /usr/local/rvm/rubies/ruby-2.6.6/lib/ruby/gems/2.6.0/gems/puma-5.0.2/lib/puma/cluster.rb:573:in run'
from /usr/local/rvm/rubies/ruby-2.6.6/lib/ruby/gems/2.6.0/gems/puma-5.0.2/lib/puma/launcher.rb:171:in run' from /usr/local/rvm/rubies/ruby-2.6.6/lib/ruby/gems/2.6.0/gems/puma-5.0.2/lib/puma/cli.rb:80:in run'
from /usr/local/rvm/rubies/ruby-2.6.6/lib/ruby/gems/2.6.0/gems/puma-5.0.2/bin/puma:10:in <top (required)>' from /usr/local/rvm/rubies/ruby-2.6.6/bin/puma:23:in load'
from /usr/local/rvm/rubies/ruby-2.6.6/bin/puma:23:in <main>' from /usr/local/rvm/rubies/ruby-2.6.6/bin/ruby_executable_hooks:24:in eval'
from /usr/local/rvm/rubies/ruby-2.6.6/bin/ruby_executable_hooks:24:in <main>'

When degrading to 2.8.1 the exception goes away.

Best regards, Thomas Balsløv.

@zitooon
Copy link

zitooon commented Oct 2, 2020

Same error.
We use Rails 5.1.7 with ruby 2.6.2 and Puma 5.0.2.

Thanks for the great work !
Olivier de Robert

@ilvez
Copy link

ilvez commented Oct 2, 2020

Same error. Rails 6.0.3.3, Ruby 2.5.5, Puma 4.3.6.

@jcoglan
Copy link

jcoglan commented Oct 2, 2020

I believe this change is the source of the problem: referring to VERSION without having explicitly loaded that constant. It's stopping our Rails app from booting.

https://github.com/BetterErrors/better_errors/compare/v2.8.1..master#diff-5e3c1d57ea649185a86b730f951f5a18R43

@addisonmartin
Copy link
Contributor

I've submitted a fix:
#480

@RobinDaugherty
Copy link
Member

Very sorry for my mistake everyone, release 2.8.3 fixes this and is live (and I tested it in an app). Thank you @addisonmartin and @peaonunes for the PRs!

@thomasbalsloev
Copy link
Author

Thanks guys!! @RobinDaugherty, @addisonmartin, @peaonunes

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

6 participants