zombocom / derailed_benchmarks

Go faster, off the Rails - Benchmarks for your whole Rails app
2.97k stars 144 forks source link

Fix tests with Ruby 3.1.2 #220

Closed schneems closed 2 years ago

schneems commented 2 years ago

Getting an error message when running tests with Ruby 3.1

$ BUNDLE_GEMFILE=gemfiles/rails_6_1.gemfile bundle install
#...
$ BUNDLE_GEMFILE=gemfiles/rails_6_1.gemfile bundle exec rake test
/Users/rschneeman/.gem/ruby/3.1.2/gems/ruby-statistics-3.0.0/lib/statistics/statistical_test/f_test.rb:32: warning: assigned but unused variable - sample_stds
/Users/rschneeman/.gem/ruby/3.1.2/gems/mini_histogram-0.3.1/lib/mini_histogram/plot.rb:80: warning: method redefined; discarding old plot
/Users/rschneeman/.gem/ruby/3.1.2/gems/mini_histogram-0.3.1/lib/mini_histogram.rb:201: warning: previous definition of plot was here
/Users/rschneeman/.gem/ruby/3.1.2/gems/activesupport-6.1.6/lib/active_support/core_ext/class/subclasses.rb:30: warning: method redefined; discarding old subclasses
/Users/rschneeman/.gem/ruby/3.1.2/gems/devise-4.8.1/lib/devise/rails/warden_compat.rb:4: warning: method redefined; discarding old request
/Users/rschneeman/.gem/ruby/3.1.2/gems/warden-1.2.9/lib/warden/mixins/common.rb:18: warning: previous definition of request was here
/Users/rschneeman/.gem/ruby/3.1.2/gems/devise-4.8.1/lib/devise/rails/warden_compat.rb:8: warning: method redefined; discarding old reset_session!
/Users/rschneeman/.gem/ruby/3.1.2/gems/warden-1.2.9/lib/warden/mixins/common.rb:39: warning: previous definition of reset_session! was here
/Users/rschneeman/.gem/ruby/3.1.2/gems/zeitwerk-2.6.0/lib/zeitwerk/kernel.rb:24: warning: method redefined; discarding old require
/Users/rschneeman/.gem/ruby/3.1.2/gems/dead_end-4.0.0/lib/dead_end/core_ext.rb:70: warning: previous definition of require was here
config.eager_load is set to nil. Please update your config/environments/*.rb files accordingly:

  * development - set it to false
  * test - set it to false (unless you use a tool that preloads your test environment)
  * production - set it to true

/Users/rschneeman/.gem/ruby/3.1.2/gems/devise-4.8.1/lib/devise/failure_app.rb:29: warning: method redefined; discarding old default_url_options
/Users/rschneeman/.gem/ruby/3.1.2/gems/actionpack-6.1.6/lib/action_dispatch/routing/url_for.rb:95: warning: previous definition of default_url_options was here
You don't have net-smtp installed in your application. Please add it to your Gemfile and run bundle install
/Users/rschneeman/.gem/ruby/3.1.2/gems/dead_end-4.0.0/lib/dead_end/core_ext.rb:71:in `require': cannot load such file -- net/smtp (LoadError)
    from /Users/rschneeman/.gem/ruby/3.1.2/gems/dead_end-4.0.0/lib/dead_end/core_ext.rb:71:in `require'
    from /Users/rschneeman/.gem/ruby/3.1.2/gems/zeitwerk-2.6.0/lib/zeitwerk/kernel.rb:35:in `require'
    from /Users/rschneeman/.gem/ruby/3.1.2/gems/mail-2.7.1/lib/mail.rb:9:in `<module:Mail>'
    from /Users/rschneeman/.gem/ruby/3.1.2/gems/mail-2.7.1/lib/mail.rb:3:in `<top (required)>'
    from /Users/rschneeman/.gem/ruby/3.1.2/gems/dead_end-4.0.0/lib/dead_end/core_ext.rb:71:in `require'
    from /Users/rschneeman/.gem/ruby/3.1.2/gems/dead_end-4.0.0/lib/dead_end/core_ext.rb:71:in `require'
    from /Users/rschneeman/.gem/ruby/3.1.2/gems/zeitwerk-2.6.0/lib/zeitwerk/kernel.rb:35:in `require'
    from /Users/rschneeman/.gem/ruby/3.1.2/gems/actionmailer-6.1.6/lib/action_mailer/mail_with_error_handling.rb:4:in `<top (required)>'
    from /Users/rschneeman/.gem/ruby/3.1.2/gems/dead_end-4.0.0/lib/dead_end/core_ext.rb:71:in `require'
    from /Users/rschneeman/.gem/ruby/3.1.2/gems/dead_end-4.0.0/lib/dead_end/core_ext.rb:71:in `require'
    from /Users/rschneeman/.gem/ruby/3.1.2/gems/zeitwerk-2.6.0/lib/zeitwerk/kernel.rb:35:in `require'
    from /Users/rschneeman/.gem/ruby/3.1.2/gems/actionmailer-6.1.6/lib/action_mailer/base.rb:3:in `<top (required)>'
    from /Users/rschneeman/.gem/ruby/3.1.2/gems/dead_end-4.0.0/lib/dead_end/core_ext.rb:71:in `require'
    from /Users/rschneeman/.gem/ruby/3.1.2/gems/dead_end-4.0.0/lib/dead_end/core_ext.rb:71:in `require'
    from /Users/rschneeman/.gem/ruby/3.1.2/gems/zeitwerk-2.6.0/lib/zeitwerk/kernel.rb:35:in `require'
    from /Users/rschneeman/.gem/ruby/3.1.2/gems/activesupport-6.1.6/lib/active_support/inflector/methods.rb:288:in `const_get'
    from /Users/rschneeman/.gem/ruby/3.1.2/gems/activesupport-6.1.6/lib/active_support/inflector/methods.rb:288:in `block in constantize'
    from /Users/rschneeman/.gem/ruby/3.1.2/gems/activesupport-6.1.6/lib/active_support/inflector/methods.rb:284:in `each'
    from /Users/rschneeman/.gem/ruby/3.1.2/gems/activesupport-6.1.6/lib/active_support/inflector/methods.rb:284:in `inject'
    from /Users/rschneeman/.gem/ruby/3.1.2/gems/activesupport-6.1.6/lib/active_support/inflector/methods.rb:284:in `constantize'
    from /Users/rschneeman/.gem/ruby/3.1.2/gems/activesupport-6.1.6/lib/active_support/core_ext/string/inflections.rb:74:in `constantize'
    from /Users/rschneeman/.gem/ruby/3.1.2/gems/devise-4.8.1/app/mailers/devise/mailer.rb:4:in `<top (required)>'
    from /Users/rschneeman/.gem/ruby/3.1.2/gems/dead_end-4.0.0/lib/dead_end/core_ext.rb:71:in `require'
    from /Users/rschneeman/.gem/ruby/3.1.2/gems/dead_end-4.0.0/lib/dead_end/core_ext.rb:71:in `require'
    from /Users/rschneeman/.gem/ruby/3.1.2/gems/zeitwerk-2.6.0/lib/zeitwerk/kernel.rb:27:in `require'
mootpointer commented 2 years ago

Fixed by #221