nevir / Bumbler

Track the load progress of your Bundler-based projects
MIT License
706 stars 19 forks source link

not working in rails 6.0 #24

Closed sobakasu closed 4 years ago

sobakasu commented 5 years ago
         3: from /home/andrew/.rvm/gems/ruby-2.5.5/gems/activesupport-6.0.0/lib/active_support/deprecation/proxy_wrappers.rb:128:in `new'
         2: from /home/andrew/.rvm/gems/ruby-2.5.5/gems/activesupport-6.0.0/lib/active_support/deprecation/proxy_wrappers.rb:128:in `new'
         1: from /home/andrew/.rvm/gems/ruby-2.5.5/gems/activesupport-6.0.0/lib/active_support/deprecation/proxy_wrappers.rb:132:in `initialize'
/home/andrew/.rvm/gems/ruby-2.5.5/gems/activesupport-6.0.0/lib/active_support/deprecation/proxy_wrappers.rb:168:in `method_missing': private method `warn' called for nil:NilClass (NoMethodError)
grosser commented 5 years ago

sounds like the logger is not initialized yet ... is there more backtrace, looks like it's just inside rails ? try disabling rails backtrace cleaner, it might be hiding gem backtraces

sobakasu commented 5 years ago

full backtrace attached. this is for a newly created rails 6 apps. bumbler.txt

grosser commented 5 years ago

so error is from https://github.com/nevir/Bumbler/blob/v0.5.0/lib/bumbler/hooks.rb#L35

... most likely hitting some deprecation, open up /home/andrew/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.0/lib/active_support/deprecation/proxy_wrappers.rb:168 and add a puts for whatever it tries to send as warning ... that should show what's going wrong

Laykou commented 4 years ago

👍

Laykou commented 4 years ago

@nevir Do you think you could help here, please?

grosser commented 4 years ago

make an example rails 6 app where it does not work and I can take a look ... gem open bumbler and a bit of puts should go a long way :)

cw2908 commented 4 years ago

I also have this problem. Sorry for deleting what was previously in this post but it can be reproduced more simply as so:

  > gem install bumbler
  > rails new bumbler-test -T -C --api -d=postgresql
  > cd bumbler-test
  > rails -v # => Rails 6.0.2.1
  > bundle add administrate
  > bumbler

Same problem if I bundle add bumbler

gbxl commented 4 years ago

Same issue with Rails 6.0.1

grosser commented 4 years ago

I got this when not adding bumbler to the gemfile:

bumbler-0.6.0/lib/bumbler/hooks.rb:32:in `require': cannot load such file -- bumbler/stats (LoadError)

then with bundle add administrate

NoMethodError: private method `warn' called for nil:NilClass
vendor/bundle/gems/activesupport-6.0.2.2/lib/active_support/deprecation/proxy_wrappers.rb:168:in `method_missing'
vendor/bundle/gems/activesupport-6.0.2.2/lib/active_support/deprecation/proxy_wrappers.rb:132:in `initialize'
vendor/bundle/gems/activesupport-6.0.2.2/lib/active_support/deprecation/proxy_wrappers.rb:128:in `new'
vendor/bundle/gems/activesupport-6.0.2.2/lib/active_support/deprecation/proxy_wrappers.rb:128:in `new'
vendor/bundle/gems/railties-6.0.2.2/lib/rails/source_annotation_extractor.rb:162:in `<top (required)>'
vendor/bundle/gems/bumbler-0.6.0/lib/bumbler/hooks.rb:32:in `require'

... failure comes from

ActiveSupport::Deprecation::DeprecatedConstantProxy.
  new("SourceAnnotationExtractor", "Rails::SourceAnnotationExtractor")

which triggers a require for activesupport/deprecations but from itself .... ... which then goes into @deprecator.warn(@message, caller_locations)

... removing the line that uses ActiveSupport::Deprecation::DeprecatedConstantProxy works ... not sure why administrate triggers it ... but rewriting it fixes the issue, so let's do that :) https://github.com/nevir/Bumbler/pull/26

grosser commented 4 years ago

0.7.0