BetterErrors / better_errors

Better error page for Rack apps

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support for Ruby 2.6.1

davidhrbac opened this issue · comments

It seems that better_errors has issue with Ruby 2.6.

10:56:19 web.1     | rake aborted!
10:56:19 web.1     | NameError: uninitialized constant ActionView::Template::Handlers::ERB::Erubi
10:56:19 web.1     | /home/vagrant/.rvm/gems/ruby-2.6.1/gems/bootsnap-1.4.1/lib/bootsnap/load_path_cache/core_ext/active_support.rb:60:in `block in load_missing_constant'
10:56:19 web.1     | /home/vagrant/.rvm/gems/ruby-2.6.1/gems/bootsnap-1.4.1/lib/bootsnap/load_path_cache/core_ext/active_support.rb:16:in `allow_bootsnap_retry'
10:56:19 web.1     | /home/vagrant/.rvm/gems/ruby-2.6.1/gems/bootsnap-1.4.1/lib/bootsnap/load_path_cache/core_ext/active_support.rb:59:in `load_missing_constant'
10:56:19 web.1     | /home/vagrant/.rvm/gems/ruby-2.6.1/gems/haml-5.0.4/lib/haml/railtie.rb:37:in `block (2 levels) in <class:Railtie>'
10:56:19 web.1     | /home/vagrant/.rvm/gems/ruby-2.6.1/gems/activesupport-5.0.7.1/lib/active_support/lazy_load_hooks.rb:69:in `instance_eval'
10:56:19 web.1     | /home/vagrant/.rvm/gems/ruby-2.6.1/gems/activesupport-5.0.7.1/lib/active_support/lazy_load_hooks.rb:69:in `block in execute_hook'
10:56:19 web.1     | /home/vagrant/.rvm/gems/ruby-2.6.1/gems/activesupport-5.0.7.1/lib/active_support/lazy_load_hooks.rb:60:in `with_execution_control'
10:56:19 web.1     | /home/vagrant/.rvm/gems/ruby-2.6.1/gems/activesupport-5.0.7.1/lib/active_support/lazy_load_hooks.rb:65:in `execute_hook'
10:56:19 web.1     | /home/vagrant/.rvm/gems/ruby-2.6.1/gems/activesupport-5.0.7.1/lib/active_support/lazy_load_hooks.rb:41:in `block in on_load'
10:56:19 web.1     | /home/vagrant/.rvm/gems/ruby-2.6.1/gems/activesupport-5.0.7.1/lib/active_support/lazy_load_hooks.rb:40:in `each'
10:56:19 web.1     | /home/vagrant/.rvm/gems/ruby-2.6.1/gems/activesupport-5.0.7.1/lib/active_support/lazy_load_hooks.rb:40:in `on_load'
10:56:19 web.1     | /home/vagrant/.rvm/gems/ruby-2.6.1/gems/haml-5.0.4/lib/haml/railtie.rb:22:in `block in <class:Railtie>'
10:56:19 web.1     | /home/vagrant/.rvm/gems/ruby-2.6.1/gems/railties-5.0.7.1/lib/rails/initializable.rb:30:in `instance_exec'
10:56:19 web.1     | /home/vagrant/.rvm/gems/ruby-2.6.1/gems/railties-5.0.7.1/lib/rails/initializable.rb:30:in `run'
10:56:19 web.1     | /home/vagrant/.rvm/gems/ruby-2.6.1/gems/railties-5.0.7.1/lib/rails/initializable.rb:55:in `block in run_initializers'
10:56:19 web.1     | /home/vagrant/.rvm/gems/ruby-2.6.1/gems/railties-5.0.7.1/lib/rails/initializable.rb:54:in `run_initializers'
10:56:19 web.1     | /home/vagrant/.rvm/gems/ruby-2.6.1/gems/railties-5.0.7.1/lib/rails/application.rb:352:in `initialize!'
10:56:19 web.1     | /home/vagrant/scs-ror/config/environment.rb:5:in `<main>'
10:56:19 web.1     | /home/vagrant/.rvm/gems/ruby-2.6.1/gems/bootsnap-1.4.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
10:56:19 web.1     | /home/vagrant/.rvm/gems/ruby-2.6.1/gems/bootsnap-1.4.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
10:56:19 web.1     | /home/vagrant/.rvm/gems/ruby-2.6.1/gems/bootsnap-1.4.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:83:in `register'
10:56:19 web.1     | /home/vagrant/.rvm/gems/ruby-2.6.1/gems/bootsnap-1.4.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
10:56:19 web.1     | /home/vagrant/.rvm/gems/ruby-2.6.1/gems/bootsnap-1.4.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
10:56:19 web.1     | /home/vagrant/.rvm/gems/ruby-2.6.1/gems/railties-5.0.7.1/lib/rails/application.rb:328:in `require_environment!'
10:56:19 web.1     | /home/vagrant/.rvm/gems/ruby-2.6.1/gems/railties-5.0.7.1/lib/rails/application.rb:448:in `block in run_tasks_blocks'
10:56:19 web.1     | /home/vagrant/.rvm/gems/ruby-2.6.1/bin/ruby_executable_hooks:24:in `eval'
10:56:19 web.1     | /home/vagrant/.rvm/gems/ruby-2.6.1/bin/ruby_executable_hooks:24:in `<main>'
10:56:19 web.1     | Tasks: TOP => db:migrate => environment

Removing better_errors from Gemfile helped.

Can you provide some more information about your project and steps to reproduce? I'm currently using Better Errors in production with Ruby 2.6.1 and I haven't experienced this issue.

We had upgraded Ruby 2.5.3 to 2.6.1. We had this issue with Rails 5.0.7.1. I have just upgraded Rails to 5.2.2 and the issue is gone.

railties (5.2.2)
better_errors (2.5.1)
ruby-2.6.1

Same issue with ruby 2.6.2 and rails 4.2.11

Would really appreciate a reproducible case. If anyone can send a Rails app that fails, that would be great.

To be clear, I have multiple projects running Rails 5.0, 5.1, and 5.2 with Ruby 2.6.1 and 2.6.2, and I'm not able to reproduce.

@RobinDaugherty ruby 2.6.2 and rails 4.2.11

@RobinDaugherty seems to be a problem when the project also has haml-rails gem. @dawidof is this true of your project, too?

@eliluvish yeap
Gemfile.lock

...
    haml (5.0.4)
      temple (>= 0.8.0)
      tilt
    haml-rails (1.0.0)
      actionpack (>= 4.0.1)
      activesupport (>= 4.0.1)
      haml (>= 4.0.6, < 6.0)
      html2haml (>= 1.0.1)
      railties (>= 4.0.1)
...

hello, better_errors not working with latest Ruby , when I stop mysql , the better_errors were working, and show the error that my mysql was off, but when I start/connecting mysql, and then I go to wrong routes, the better_errors not working anymore , am I missing something ? first time using better_errors

here when my mysql server off :
Screen Shot 2019-05-06 at 06 27 20

then I turn on my MySQL server
Screen Shot 2019-05-06 at 06 27 39

Screen Shot 2019-05-06 at 06 29 21

@harmnot the Routing Error page is a feature of Rails that will be shown any time you go to an invalid path in development.

@RobinDaugherty I'm with trouble using ruby 2.6.3 and rails 5.2.4.1
It shows me the regular rails error page instead of the better errors one. I'm using the config.consider_all_requests_local = true in my development enviroment configuration.

Also I'm using docker to run my app in local development

Could you please help me?

Ok I manage to show better_errors page, Since I'm using docker I had to allow the ip.
but Is not being showed the REPL, Is there some way to this be showed?