Closed sobakasu closed 4 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
full backtrace attached. this is for a newly created rails 6 apps. bumbler.txt
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
👍
@nevir Do you think you could help here, please?
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 :)
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
Same issue with Rails 6.0.1
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
0.7.0