SciRuby / statsample

A suite for basic and advanced statistics on Ruby.
https://github.com/sciruby/statsample
BSD 3-Clause "New" or "Revised" License
95 stars 29 forks source link

NoMethodError - undefined method `zero?' for nil:NilClass: #47

Open pocman opened 8 years ago

pocman commented 8 years ago

After updating to 2.0.1, I have this issue :

NoMethodError - undefined method `zero?' for nil:NilClass:
  activerecord (3.2.22) lib/active_record/associations/alias_tracker.rb:30:in `aliased_name_for'
  activerecord (3.2.22) lib/active_record/associations/alias_tracker.rb:18:in `aliased_table_for'
  activerecord (3.2.22) lib/active_record/associations/join_helper.rb:15:in `block in construct_tables'
  activerecord (3.2.22) lib/active_record/associations/join_helper.rb:14:in `construct_tables'
  activerecord (3.2.22) lib/active_record/associations/association_scope.rb:37:in `add_constraints'
  activerecord (3.2.22) lib/active_record/associations/association_scope.rb:31:in `scope'
  activerecord (3.2.22) lib/active_record/associations/association.rb:99:in `association_scope'
  activerecord (3.2.22) lib/active_record/associations/association.rb:88:in `scoped'
  activerecord (3.2.22) lib/active_record/associations/singular_association.rb:42:in `find_target'
  activerecord (3.2.22) lib/active_record/associations/association.rb:151:in `load_target'
  activerecord (3.2.22) lib/active_record/associations/association.rb:56:in `reload'
  activerecord (3.2.22) lib/active_record/associations/singular_association.rb:9:in `reader'
  activerecord (3.2.22) lib/active_record/associations/builder/association.rb:44:in `block in define_readers'
  app/controllers/user_sessions_controller.rb:22:in `create'
  actionpack (3.2.22) lib/action_controller/metal/implicit_render.rb:4:in `send_action'
  actionpack (3.2.22) lib/abstract_controller/base.rb:167:in `process_action'
  actionpack (3.2.22) lib/action_controller/metal/rendering.rb:10:in `process_action'
  actionpack (3.2.22) lib/abstract_controller/callbacks.rb:18:in `block in process_action'
  activesupport (3.2.22) lib/active_support/callbacks.rb:415:in `block in _run__4248930996535680107__process_action__60857023007713096__callbacks'
  activesupport (3.2.22) lib/active_support/callbacks.rb:215:in `block in _conditional_callback_around_517'
  activesupport (3.2.22) lib/active_support/callbacks.rb:326:in `around'
  activesupport (3.2.22) lib/active_support/callbacks.rb:310:in `_callback_around_13'
  activesupport (3.2.22) lib/active_support/callbacks.rb:214:in `_conditional_callback_around_517'
  activesupport (3.2.22) lib/active_support/callbacks.rb:414:in `_run__4248930996535680107__process_action__60857023007713096__callbacks'
  activesupport (3.2.22) lib/active_support/callbacks.rb:405:in `__run_callback'
  activesupport (3.2.22) lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
  activesupport (3.2.22) lib/active_support/callbacks.rb:81:in `run_callbacks'
  actionpack (3.2.22) lib/abstract_controller/callbacks.rb:17:in `process_action'
  actionpack (3.2.22) lib/action_controller/metal/rescue.rb:29:in `process_action'
  actionpack (3.2.22) lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
  activesupport (3.2.22) lib/active_support/notifications.rb:123:in `block in instrument'
  activesupport (3.2.22) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
  activesupport (3.2.22) lib/active_support/notifications.rb:123:in `instrument'
  actionpack (3.2.22) lib/action_controller/metal/instrumentation.rb:29:in `process_action'
  actionpack (3.2.22) lib/action_controller/metal/params_wrapper.rb:207:in `process_action'
  activerecord (3.2.22) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
  actionpack (3.2.22) lib/abstract_controller/base.rb:121:in `process'
  actionpack (3.2.22) lib/abstract_controller/rendering.rb:45:in `process'
  actionpack (3.2.22) lib/action_controller/metal.rb:203:in `dispatch'
  actionpack (3.2.22) lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
  actionpack (3.2.22) lib/action_controller/metal.rb:246:in `block in action'
  actionpack (3.2.22) lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
  actionpack (3.2.22) lib/action_dispatch/routing/route_set.rb:36:in `call'
  journey (1.0.4) lib/journey/router.rb:68:in `block in call'
  journey (1.0.4) lib/journey/router.rb:56:in `call'
  actionpack (3.2.22) lib/action_dispatch/routing/route_set.rb:608:in `call'
  exception_notification (4.1.1) lib/exception_notification/rack.rb:32:in `call'
  dragonfly (1.0.3) lib/dragonfly/middleware.rb:14:in `call'
  meta_request (0.3.4) lib/meta_request/middlewares/app_request_handler.rb:13:in `call'
  meta_request (0.3.4) lib/meta_request/middlewares/meta_request_handler.rb:13:in `call'
  sass (3.2.6) lib/sass/plugin/rack.rb:54:in `call'
  actionpack (3.2.22) lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
  rack (1.4.7) lib/rack/etag.rb:23:in `call'
  rack (1.4.7) lib/rack/conditionalget.rb:35:in `call'
  actionpack (3.2.22) lib/action_dispatch/middleware/head.rb:14:in `call'
  actionpack (3.2.22) lib/action_dispatch/middleware/params_parser.rb:21:in `call'
  actionpack (3.2.22) lib/action_dispatch/middleware/flash.rb:242:in `call'
  rack (1.4.7) lib/rack/session/abstract/id.rb:210:in `context'
  rack (1.4.7) lib/rack/session/abstract/id.rb:205:in `call'
  actionpack (3.2.22) lib/action_dispatch/middleware/cookies.rb:341:in `call'
  activerecord (3.2.22) lib/active_record/query_cache.rb:64:in `call'
  activerecord (3.2.22) lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call'
  actionpack (3.2.22) lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
  activesupport (3.2.22) lib/active_support/callbacks.rb:405:in `_run__5345949111146849__call__2971314789955665953__callbacks'
  activesupport (3.2.22) lib/active_support/callbacks.rb:405:in `__run_callback'
  activesupport (3.2.22) lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
  activesupport (3.2.22) lib/active_support/callbacks.rb:81:in `run_callbacks'
  actionpack (3.2.22) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
  actionpack (3.2.22) lib/action_dispatch/middleware/reloader.rb:65:in `call'
  actionpack (3.2.22) lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
  rack-contrib (1.1.0) lib/rack/contrib/response_headers.rb:17:in `call'
  meta_request (0.3.4) lib/meta_request/middlewares/headers.rb:16:in `call'
  better_errors (2.0.0) lib/better_errors/middleware.rb:84:in `protected_app_call'
  better_errors (2.0.0) lib/better_errors/middleware.rb:79:in `better_errors_call'
  better_errors (2.0.0) lib/better_errors/middleware.rb:57:in `call'
  actionpack (3.2.22) lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
  actionpack (3.2.22) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
  railties (3.2.22) lib/rails/rack/logger.rb:32:in `call_app'
  railties (3.2.22) lib/rails/rack/logger.rb:18:in `call'
  actionpack (3.2.22) lib/action_dispatch/middleware/request_id.rb:22:in `call'
  rack (1.4.7) lib/rack/methodoverride.rb:21:in `call'
  dragonfly (1.0.3) lib/dragonfly/cookie_monster.rb:9:in `call'
  rack (1.4.7) lib/rack/runtime.rb:17:in `call'
  rack (1.4.7) lib/rack/lock.rb:15:in `call'
  actionpack (3.2.22) lib/action_dispatch/middleware/static.rb:83:in `call'
  railties (3.2.22) lib/rails/engine.rb:484:in `call'
  railties (3.2.22) lib/rails/application.rb:231:in `call'
  railties (3.2.22) lib/rails/railtie/configurable.rb:30:in `method_missing'
  rack-cors (0.4.0) lib/rack/cors.rb:80:in `call'
  rack (1.4.7) lib/rack/content_length.rb:14:in `call'
  unicorn (4.8.3) lib/unicorn/http_server.rb:576:in `process_client'
  unicorn (4.8.3) lib/unicorn/http_server.rb:670:in `worker_loop'
  unicorn (4.8.3) lib/unicorn/http_server.rb:525:in `spawn_missing_workers'
  unicorn (4.8.3) lib/unicorn/http_server.rb:140:in `start'
  unicorn-rails (2.2.0) lib/unicorn_rails.rb:33:in `run'
  rack (1.4.7) lib/rack/server.rb:268:in `start'
  railties (3.2.22) lib/rails/commands/server.rb:70:in `start'
  railties (3.2.22) lib/rails/commands.rb:55:in `block in <top (required)>'
  railties (3.2.22) lib/rails/commands.rb:50:in `<top (required)>'
  script/rails:6:in `<main>'

Seems to be related to : https://github.com/clbustos/statsample/issues/45

v0dro commented 8 years ago

Can you share your code?

v0dro commented 8 years ago

Hmm interesting issue. Will check it out.

pocman commented 8 years ago

It's not really related to any specific line of code, it just "explode" on every url in a different method but with the same error message. Going back to 1.4.3 fixed the issue.