girishso / rails-client-logger

Rails engine for logging from Browser Javascript to server
MIT License
25 stars 14 forks source link

0.0.2 is incompatible with annotate gem  #5

Open leonsp opened 9 years ago

leonsp commented 9 years ago

If I run "bundle exec annotate" on my Rails 3.x application, I get this error:

/Users/username/.rvm/gems/ruby-1.9.3-p484/gems/activesupport-3.1.12/lib/active_support/dependencies.rb:378:in const_defined?': wrong constant name Rails-client-logger (NameError) from /Users/username/.rvm/gems/ruby-1.9.3-p484/gems/activesupport-3.1.12/lib/active_support/dependencies.rb:378:inlocal_const_defined?' from /Users/username/.rvm/gems/ruby-1.9.3-p484/gems/activesupport-3.1.12/lib/active_support/dependencies.rb:365:in block in qualified_const_defined?' from /Users/username/.rvm/gems/ruby-1.9.3-p484/gems/activesupport-3.1.12/lib/active_support/dependencies.rb:364:ineach' from /Users/username/.rvm/gems/ruby-1.9.3-p484/gems/activesupport-3.1.12/lib/active_support/dependencies.rb:364:in inject' from /Users/username/.rvm/gems/ruby-1.9.3-p484/gems/activesupport-3.1.12/lib/active_support/dependencies.rb:364:inqualified_const_defined?' from /Users/username/.rvm/gems/ruby-1.9.3-p484/gems/activesupport-3.1.12/lib/active_support/dependencies.rb:125:in block in watch_namespaces' from /Users/username/.rvm/gems/ruby-1.9.3-p484/gems/activesupport-3.1.12/lib/active_support/dependencies.rb:123:inmap' from /Users/username/.rvm/gems/ruby-1.9.3-p484/gems/activesupport-3.1.12/lib/active_support/dependencies.rb:123:in watch_namespaces' from /Users/username/.rvm/gems/ruby-1.9.3-p484/gems/activesupport-3.1.12/lib/active_support/dependencies.rb:636:innew_constants_in' from /Users/username/.rvm/gems/ruby-1.9.3-p484/gems/activesupport-3.1.12/lib/active_support/dependencies.rb:455:in load_file' from /Users/username/.rvm/gems/ruby-1.9.3-p484/gems/activesupport-3.1.12/lib/active_support/dependencies.rb:342:inrequire_or_load' from /Users/username/.rvm/gems/ruby-1.9.3-p484/gems/activesupport-3.1.12/lib/active_support/dependencies.rb:302:in depend_on' from /Users/username/.rvm/gems/ruby-1.9.3-p484/gems/activesupport-3.1.12/lib/active_support/dependencies.rb:214:inrequire_dependency' from /Users/username/.rvm/gems/ruby-1.9.3-p484/gems/railties-3.1.12/lib/rails/engine.rb:417:in block (2 levels) in eager_load!' from /Users/username/.rvm/gems/ruby-1.9.3-p484/gems/railties-3.1.12/lib/rails/engine.rb:416:ineach' from /Users/username/.rvm/gems/ruby-1.9.3-p484/gems/railties-3.1.12/lib/rails/engine.rb:416:in block in eager_load!' from /Users/username/.rvm/gems/ruby-1.9.3-p484/gems/railties-3.1.12/lib/rails/engine.rb:414:ineach' from /Users/username/.rvm/gems/ruby-1.9.3-p484/gems/railties-3.1.12/lib/rails/engine.rb:414:in eager_load!' from /Users/username/.rvm/gems/ruby-1.9.3-p484/gems/railties-3.1.12/lib/rails/application/railties.rb:8:ineach' from /Users/username/.rvm/gems/ruby-1.9.3-p484/gems/railties-3.1.12/lib/rails/application/railties.rb:8:in all' from /Users/username/.rvm/gems/ruby-1.9.3-p484/gems/railties-3.1.12/lib/rails/engine.rb:412:ineager_load!' from /Users/username/.rvm/gems/ruby-1.9.3-p484/gems/railties-3.1.12/lib/rails/railtie/configurable.rb:30:in method_missing' from /Users/username/.rvm/gems/ruby-1.9.3-p484/gems/annotate-2.6.5/lib/annotate.rb:109:ineager_load' from /Users/username/.rvm/gems/ruby-1.9.3-p484/gems/annotate-2.6.5/bin/annotate:155:in <top (required)>' from /Users/username/.rvm/gems/ruby-1.9.3-p484/bin/annotate:23:inload' from /Users/username/.rvm/gems/ruby-1.9.3-p484/bin/annotate:23:in `

'

I can reproduce it by opening up Rails console (bundle exec rails c) and running these two lines of code:

klass = Rails::Application.send(:subclasses).first
klass.eager_load!
leopoldodonnell commented 9 years ago

I'm seeing the same thing without the annotate gem (Rails 3.2.13).

macejmic commented 8 years ago

The same thing with (1.1.0) bundle exec sidekiq (Rails 4.2.5)

aussiDavid commented 8 years ago

I'm getting the same error when I run bundle exec sidekiq too. Any ideas on how to fix this? This only seems to happen on my development stage

afr1983 commented 7 years ago

In my fork I just removed the apparently unnecessary folder app/controllers/rails-client-logger and it seems to work with Sidekiq, however tests are failing.

cc @girishso