zombocom / derailed_benchmarks

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

getting a 'Normal is not a module (TypeError)' #200

Closed dfuentes77 closed 2 years ago

dfuentes77 commented 2 years ago

when trying to run bundle exec derailed bundle:mem

/distribution-0.7.3/lib/distribution/normal/ruby.rb:2:in `<module:Distribution>': Normal is not a module (TypeError)

block at top of said file:

module Distribution
  module Normal
    module Ruby_
      class << self

What do I need to do to get passed this point since this gem works just fine for us.

dfuentes77 commented 2 years ago

I've added require: false in the meantime to get passed this. And I've opened https://github.com/clbustos/distribution/issues/31

schneems commented 2 years ago

You've got one thing defining Normal as a class and another as a module. You'll need to see what is setting it.

You can use https://www.schneems.com/2016/01/25/ruby-debugging-magic-cheat-sheet.html.

sup(Distribution::Normal)

At the top of your file and it might point to where it's defined. Or try Distribution.const_source_location(:Normal).

This doesn't look like a bug in derailed, it looks like an issue with your app or another library. Derailed doesn't set that constant.