estebanz01 / ruby-statistics

Ruby gem for some statistical operations without any statistical language dependency
MIT License
109 stars 16 forks source link

4.0.1 issue #146

Closed kapso closed 1 month ago

kapso commented 2 months ago

Running into this issue

Rails - 7.1.4 Ruby - 3.3.4

Issue

.rbenv/versions/3.3.4/lib/ruby/3.3.0/bundled_gems.rb:74:in `require': cannot load such file -- statistics (LoadError)
    from /Users/kapil/.rbenv/versions/3.3.4/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
    from /Users/kapil/.rbenv/versions/3.3.4/lib/ruby/gems/3.3.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:17:in `require'
    from /Users/kapil/.rbenv/versions/3.3.4/lib/ruby/gems/3.3.0/gems/zeitwerk-2.6.18/lib/zeitwerk/kernel.rb:34:in `require'
    from /Users/kapil/.rbenv/versions/3.3.4/lib/ruby/gems/3.3.0/gems/skylight-6.0.4/lib/skylight/probes.rb:166:in `require'
    from /Users/kapil/.rbenv/versions/3.3.4/lib/ruby/gems/3.3.0/gems/derailed_benchmarks-2.1.2/lib/derailed_benchmarks/stats_from_dir.rb:4:in `<main>'
    from /Users/kapil/.rbenv/versions/3.3.4/lib/ruby/3.3.0/bundled_gems.rb:74:in `require'
    from /Users/kapil/.rbenv/versions/3.3.4/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
    from /Users/kapil/.rbenv/versions/3.3.4/lib/ruby/gems/3.3.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
    from /Users/kapil/.rbenv/versions/3.3.4/lib/ruby/gems/3.3.0/gems/zeitwerk-2.6.18/lib/zeitwerk/kernel.rb:34:in `require'
    from /Users/kapil/.rbenv/versions/3.3.4/lib/ruby/gems/3.3.0/gems/skylight-6.0.4/lib/skylight/probes.rb:166:in `require'
    from /Users/kapil/.rbenv/versions/3.3.4/lib/ruby/gems/3.3.0/gems/derailed_benchmarks-2.1.2/lib/derailed_benchmarks.rb:48:in `<main>'
estebanz01 commented 2 months ago

Hi, this seems to be a problem at derailed_benchmarks gem. You can see the reported issue here: https://github.com/zombocom/derailed_benchmarks/issues/237

What you can try is to add the gem in the Gemfile pointing to the latest 3.x version: gem 'ruby-statistics', '~> 3.0.2' which does not have the namespace breaking change.

estebanz01 commented 1 month ago

This issue is fixed now. Feel free to check the derailed benchmark repo for more info.