fnando / browser

Do some browser detection with Ruby. Includes ActionController integration.
MIT License
2.45k stars 361 forks source link

undefined method `match?' for Hash #530

Closed salmehdhar closed 2 years ago

salmehdhar commented 2 years ago

Description

undefined methodmatch?' for #`

this bug occurs when initializing Browser object

Software:

Full backtrace

[browser (5.3.1) lib/browser/blackberry.rb:20:in `match?'](http://suar.local:3002/ar#)
[browser (5.3.1) lib/browser/browser.rb:106:in `each'](http://suar.local:3002/ar#)
[browser (5.3.1) lib/browser/browser.rb:106:in `find'](http://suar.local:3002/ar#)
[browser (5.3.1) lib/browser/browser.rb:106:in `new'](http://suar.local:3002/ar#)
[lib/visit_tracker.rb:66:in `browser'](http://suar.local:3002/ar#)
[lib/visit_tracker.rb:16:in `track'](http://suar.local:3002/ar#)
[lib/visit_tracker.rb:12:in `track'](http://suar.local:3002/ar#)
[app/controllers/application_controller.rb:82:in `update_visits_count'](http://suar.local:3002/ar#)
[app/controllers/posts_controller.rb:9:in `show'](http://suar.local:3002/ar#)
[actionpack (6.0.0) lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'](http://suar.local:3002/ar#)
[actionpack (6.0.0) lib/abstract_controller/base.rb:196:in `process_action'](http://suar.local:3002/ar#)
[actionpack (6.0.0) lib/action_controller/metal/rendering.rb:30:in `process_action'](http://suar.local:3002/ar#)
[actionpack (6.0.0) lib/abstract_controller/callbacks.rb:42:in `block in process_action'](http://suar.local:3002/ar#)
[activesupport (6.0.0) lib/active_support/callbacks.rb:135:in `run_callbacks'](http://suar.local:3002/ar#)
[actionpack (6.0.0) lib/abstract_controller/callbacks.rb:41:in `process_action'](http://suar.local:3002/ar#)
[actionpack (6.0.0) lib/action_controller/metal/rescue.rb:22:in `process_action'](http://suar.local:3002/ar#)
[actionpack (6.0.0) lib/action_controller/metal/instrumentation.rb:33:in `block in process_action'](http://suar.local:3002/ar#)
[activesupport (6.0.0) lib/active_support/notifications.rb:180:in `block in instrument'](http://suar.local:3002/ar#)
[activesupport (6.0.0) lib/active_support/notifications/instrumenter.rb:24:in `instrument'](http://suar.local:3002/ar#)
[activesupport (6.0.0) lib/active_support/notifications.rb:180:in `instrument'](http://suar.local:3002/ar#)
[actionpack (6.0.0) lib/action_controller/metal/instrumentation.rb:32:in `process_action'](http://suar.local:3002/ar#)
[actionpack (6.0.0) lib/action_controller/metal/params_wrapper.rb:245:in `process_action'](http://suar.local:3002/ar#)
[activerecord (6.0.0) lib/active_record/railties/controller_runtime.rb:27:in `process_action'](http://suar.local:3002/ar#)
[actionpack (6.0.0) lib/abstract_controller/base.rb:136:in `process'](http://suar.local:3002/ar#)
[actionview (6.0.0) lib/action_view/rendering.rb:39:in `process'](http://suar.local:3002/ar#)
[actionpack (6.0.0) lib/action_controller/metal.rb:191:in `dispatch'](http://suar.local:3002/ar#)
[actionpack (6.0.0) lib/action_controller/metal.rb:252:in `dispatch'](http://suar.local:3002/ar#)
[actionpack (6.0.0) lib/action_dispatch/routing/route_set.rb:51:in `dispatch'](http://suar.local:3002/ar#)
[actionpack (6.0.0) lib/action_dispatch/routing/route_set.rb:33:in `serve'](http://suar.local:3002/ar#)
[actionpack (6.0.0) lib/action_dispatch/journey/router.rb:49:in `block in serve'](http://suar.local:3002/ar#)
[actionpack (6.0.0) lib/action_dispatch/journey/router.rb:32:in `each'](http://suar.local:3002/ar#)
[actionpack (6.0.0) lib/action_dispatch/journey/router.rb:32:in `serve'](http://suar.local:3002/ar#)
[actionpack (6.0.0) lib/action_dispatch/routing/route_set.rb:837:in `call'](http://suar.local:3002/ar#)
[omniauth (2.1.0) lib/omniauth/strategy.rb:202:in `call!'](http://suar.local:3002/ar#)
[omniauth (2.1.0) lib/omniauth/strategy.rb:169:in `call'](http://suar.local:3002/ar#)
[rack-attack (6.6.1) lib/rack/attack.rb:103:in `call'](http://suar.local:3002/ar#)
[rack-attack (6.6.1) lib/rack/attack.rb:127:in `call'](http://suar.local:3002/ar#)
[warden (1.2.9) lib/warden/manager.rb:36:in `block in call'](http://suar.local:3002/ar#)
[warden (1.2.9) lib/warden/manager.rb:34:in `catch'](http://suar.local:3002/ar#)
[warden (1.2.9) lib/warden/manager.rb:34:in `call'](http://suar.local:3002/ar#)
[rack (2.2.3) lib/rack/tempfile_reaper.rb:15:in `call'](http://suar.local:3002/ar#)
[rack (2.2.3) lib/rack/etag.rb:27:in `call'](http://suar.local:3002/ar#)
[rack (2.2.3) lib/rack/conditional_get.rb:27:in `call'](http://suar.local:3002/ar#)
[rack (2.2.3) lib/rack/head.rb:12:in `call'](http://suar.local:3002/ar#)
[actionpack (6.0.0) lib/action_dispatch/http/content_security_policy.rb:18:in `call'](http://suar.local:3002/ar#)
[rack (2.2.3) lib/rack/session/abstract/id.rb:266:in `context'](http://suar.local:3002/ar#)
[rack (2.2.3) lib/rack/session/abstract/id.rb:260:in `call'](http://suar.local:3002/ar#)
[actionpack (6.0.0) lib/action_dispatch/middleware/cookies.rb:648:in `call'](http://suar.local:3002/ar#)
[activerecord (6.0.0) lib/active_record/migration.rb:567:in `call'](http://suar.local:3002/ar#)
[actionpack (6.0.0) lib/action_dispatch/middleware/callbacks.rb:27:in `block in call'](http://suar.local:3002/ar#)
[activesupport (6.0.0) lib/active_support/callbacks.rb:101:in `run_callbacks'](http://suar.local:3002/ar#)
[actionpack (6.0.0) lib/action_dispatch/middleware/callbacks.rb:26:in `call'](http://suar.local:3002/ar#)
[actionpack (6.0.0) lib/action_dispatch/middleware/executor.rb:14:in `call'](http://suar.local:3002/ar#)
[actionpack (6.0.0) lib/action_dispatch/middleware/actionable_exceptions.rb:17:in `call'](http://suar.local:3002/ar#)
[actionpack (6.0.0) lib/action_dispatch/middleware/debug_exceptions.rb:32:in `call'](http://suar.local:3002/ar#)
[web-console (4.2.0) lib/web_console/middleware.rb:132:in `call_app'](http://suar.local:3002/ar#)
[web-console (4.2.0) lib/web_console/middleware.rb:19:in `block in call'](http://suar.local:3002/ar#)
[web-console (4.2.0) lib/web_console/middleware.rb:17:in `catch'](http://suar.local:3002/ar#)
[web-console (4.2.0) lib/web_console/middleware.rb:17:in `call'](http://suar.local:3002/ar#)
[actionpack (6.0.0) lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'](http://suar.local:3002/ar#)
[railties (6.0.0) lib/rails/rack/logger.rb:38:in `call_app'](http://suar.local:3002/ar#)
[railties (6.0.0) lib/rails/rack/logger.rb:26:in `block in call'](http://suar.local:3002/ar#)
[activesupport (6.0.0) lib/active_support/tagged_logging.rb:80:in `block in tagged'](http://suar.local:3002/ar#)
[activesupport (6.0.0) lib/active_support/tagged_logging.rb:28:in `tagged'](http://suar.local:3002/ar#)
[activesupport (6.0.0) lib/active_support/tagged_logging.rb:80:in `tagged'](http://suar.local:3002/ar#)
[railties (6.0.0) lib/rails/rack/logger.rb:26:in `call'](http://suar.local:3002/ar#)
[sprockets-rails (3.4.2) lib/sprockets/rails/quiet_assets.rb:13:in `call'](http://suar.local:3002/ar#)
[actionpack (6.0.0) lib/action_dispatch/middleware/remote_ip.rb:81:in `call'](http://suar.local:3002/ar#)
[actionpack (6.0.0) lib/action_dispatch/middleware/request_id.rb:27:in `call'](http://suar.local:3002/ar#)
[rack (2.2.3) lib/rack/method_override.rb:24:in `call'](http://suar.local:3002/ar#)
[rack (2.2.3) lib/rack/runtime.rb:22:in `call'](http://suar.local:3002/ar#)
[activesupport (6.0.0) lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'](http://suar.local:3002/ar#)
[actionpack (6.0.0) lib/action_dispatch/middleware/executor.rb:14:in `call'](http://suar.local:3002/ar#)
[actionpack (6.0.0) lib/action_dispatch/middleware/static.rb:126:in `call'](http://suar.local:3002/ar#)
[rack (2.2.3) lib/rack/sendfile.rb:110:in `call'](http://suar.local:3002/ar#)
[actionpack (6.0.0) lib/action_dispatch/middleware/host_authorization.rb:83:in `call'](http://suar.local:3002/ar#)
[rack-mini-profiler (3.0.0) lib/mini_profiler/profiler.rb:393:in `call'](http://suar.local:3002/ar#)
[rack-cors (1.1.1) lib/rack/cors.rb:100:in `call'](http://suar.local:3002/ar#)
[railties (6.0.0) lib/rails/engine.rb:526:in `call'](http://suar.local:3002/ar#)
[rack (2.2.3) lib/rack/urlmap.rb:74:in `block in call'](http://suar.local:3002/ar#)
[rack (2.2.3) lib/rack/urlmap.rb:58:in `each'](http://suar.local:3002/ar#)
[rack (2.2.3) lib/rack/urlmap.rb:58:in `call'](http://suar.local:3002/ar#)
[puma (5.6.4) lib/puma/configuration.rb:252:in `call'](http://suar.local:3002/ar#)
[puma (5.6.4) lib/puma/request.rb:77:in `block in handle_request'](http://suar.local:3002/ar#)
[puma (5.6.4) lib/puma/thread_pool.rb:340:in `with_force_shutdown'](http://suar.local:3002/ar#)
[puma (5.6.4) lib/puma/request.rb:76:in `handle_request'](http://suar.local:3002/ar#)
[puma (5.6.4) lib/puma/server.rb:441:in `process_client'](http://suar.local:3002/ar#)
[puma (5.6.4) lib/puma/thread_pool.rb:147:in `block in spawn_thread'](http://suar.local:3002/ar#)