{"action":"created","issue":{"url":"https://api.github.com/repos/ashu1061/footy/issues/10","repository_url":"https://api.github.com/repos/ashu1061/footy","labels_url":"https://api.github.com/repos/ashu1061/footy/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/ashu1061/footy/issues/10/comments","events_url":"https://api.github.com/repos/ashu1061/footy/issues/10/events","html_url":"https://github.com/ashu1061/footy/issues/10","id":156096064,"number":10,"title":"UserController#frequent_users (ActionView::Template::Error) \"Mysql2::Error: Unknown column 's_count' in 'having clause': SELECT COUNT(*) AS count_all, user.userid AS user_userid FROM `user` INNER JOIN `sessions` ON `sessions`.`userId` = `user`.`userid` GROUP BY user.userid HAVING s_count > 1\"","user":{"login":"ashu1061","id":12577416,"avatar_url":"https://avatars.githubusercontent.com/u/12577416?v=3","gravatar_id":"","url":"https://api.github.com/users/ashu1061","html_url":"https://github.com/ashu1061","followers_url":"https://api.github.com/users/ashu1061/followers","following_url":"https://api.github.com/users/ashu1061/following{/other_user}","gists_url":"https://api.github.com/users/ashu1061/gists{/gist_id}","starred_url":"https://api.github.com/users/ashu1061/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ashu1061/subscriptions","organizations_url":"https://api.github.com/users/ashu1061/orgs","repos_url":"https://api.github.com/users/ashu1061/repos","events_url":"https://api.github.com/users/ashu1061/events{/privacy}","received_events_url":"https://api.github.com/users/ashu1061/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ashu1061/footy/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-05-21T10:55:22Z","updated_at":"2016-05-21T11:41:31Z","closed_at":null,"body":"<table><tr><th>Exception</th><td>Mysql2::Error: Unknown column &#39;s_count&#39; in &#39;having clause&#39;: SELECT COUNT(*) AS count_all, user.userid AS user_userid FROM `user` INNER JOIN `sessions` ON `sessions`.`userId` = `user`.`userid` GROUP BY user.userid HAVING s_count &gt; 1</td></tr><tr><th>Last Occurrence</th><td>May 21, 2016 17:11:30 +0530</td></tr><tr><th>Count</th><td>7</td></tr></table>\n\n## Stack Trace\n<pre>[bundle].../gems/mysql2-0.3.21/lib/mysql2/client.rb:80:in `_query'\n[bundle].../gems/mysql2-0.3.21/lib/mysql2/client.rb:80:in `block in query'\n[bundle].../gems/mysql2-0.3.21/lib/mysql2/client.rb:79:in `handle_interrupt'\n[bundle].../gems/mysql2-0.3.21/lib/mysql2/client.rb:79:in `query'\n[bundle].../gems/activerecord-4.1.14/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:303:in `block in execute'\n[bundle].../gems/activerecord-4.1.14/lib/active_record/connection_adapters/abstract_adapter.rb:378:in `block in log'\n[bundle].../gems/activesupport-4.1.14/lib/active_support/notifications/instrumenter.rb:20:in `instrument'\n[bundle].../gems/activerecord-4.1.14/lib/active_record/connection_adapters/abstract_adapter.rb:372:in `log'\n[bundle].../gems/activerecord-4.1.14/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:303:in `execute'\n[bundle].../gems/activerecord-4.1.14/lib/active_record/connection_adapters/mysql2_adapter.rb:228:in `execute'\n[bundle].../gems/activerecord-4.1.14/lib/active_record/connection_adapters/mysql2_adapter.rb:232:in `exec_query'\n[bundle].../gems/activerecord-4.1.14/lib/active_record/connection_adapters/mysql2_adapter.rb:240:in `select'\n[bundle].../gems/activerecord-4.1.14/lib/active_record/connection_adapters/abstract/database_statements.rb:24:in `select_all'\n[bundle].../gems/activerecord-4.1.14/lib/active_record/connection_adapters/abstract/query_cache.rb:68:in `block in select_all'\n[bundle].../gems/activerecord-4.1.14/lib/active_record/connection_adapters/abstract/query_cache.rb:83:in `cache_sql'\n[bundle].../gems/activerecord-4.1.14/lib/active_record/connection_adapters/abstract/query_cache.rb:68:in `select_all'\n[bundle].../gems/activerecord-4.1.14/lib/active_record/relation/calculations.rb:321:in `execute_grouped_calculation'\n[bundle].../gems/activerecord-4.1.14/lib/active_record/relation/calculations.rb:225:in `perform_calculation'\n[bundle].../gems/activerecord-4.1.14/lib/active_record/relation/calculations.rb:119:in `calculate'\n[bundle].../gems/activerecord-4.1.14/lib/active_record/relation/calculations.rb:34:in `count'\n[bundle].../gems/will_paginate-3.1.0/lib/will_paginate/active_record.rb:89:in `count'\n[bundle].../gems/will_paginate-3.1.0/lib/will_paginate/active_record.rb:87:in `count'\n[bundle].../gems/activerecord-4.1.14/lib/active_record/relation.rb:248:in `size'\n[bundle].../gems/will_paginate-3.1.0/lib/will_paginate/active_record.rb:98:in `size'\n<a href='https://github.com/ashu1061/footy/blob/0c0882f21f5ccecfc69f4546115feec053ca3071/app/views/user/frequent_users.html.erb#L29'>[app].../app/views/user/frequent_users.html.erb:29:in `_app_views_user_frequent_users_html_erb__3330084599042900143_83653140'</a>\n[bundle].../gems/actionview-4.1.14/lib/action_view/template.rb:145:in `block in render'\n[bundle].../gems/activesupport-4.1.14/lib/active_support/notifications.rb:161:in `instrument'\n[bundle].../gems/actionview-4.1.14/lib/action_view/template.rb:339:in `instrument'\n[bundle].../gems/actionview-4.1.14/lib/action_view/template.rb:143:in `render'\n[bundle].../gems/actionview-4.1.14/lib/action_view/renderer/template_renderer.rb:55:in `block (2 levels) in render_template'\n[bundle].../gems/actionview-4.1.14/lib/action_view/renderer/abstract_renderer.rb:38:in `block in instrument'\n[bundle].../gems/activesupport-4.1.14/lib/active_support/notifications.rb:159:in `block in instrument'\n[bundle].../gems/activesupport-4.1.14/lib/active_support/notifications/instrumenter.rb:20:in `instrument'\n[bundle].../gems/activesupport-4.1.14/lib/active_support/notifications.rb:159:in `instrument'\n[bundle].../gems/actionview-4.1.14/lib/action_view/renderer/abstract_renderer.rb:38:in `instrument'\n[bundle].../gems/actionview-4.1.14/lib/action_view/renderer/template_renderer.rb:54:in `block in render_template'\n[bundle].../gems/actionview-4.1.14/lib/action_view/renderer/template_renderer.rb:62:in `render_with_layout'\n[bundle].../gems/actionview-4.1.14/lib/action_view/renderer/template_renderer.rb:53:in `render_template'\n[bundle].../gems/actionview-4.1.14/lib/action_view/renderer/template_renderer.rb:17:in `render'\n[bundle].../gems/actionview-4.1.14/lib/action_view/renderer/renderer.rb:42:in `render_template'\n[bundle].../gems/actionview-4.1.14/lib/action_view/renderer/renderer.rb:23:in `render'\n[bundle].../gems/actionview-4.1.14/lib/action_view/rendering.rb:99:in `_render_template'\n[bundle].../gems/actionpack-4.1.14/lib/action_controller/metal/streaming.rb:217:in `_render_template'\n[bundle].../gems/actionview-4.1.14/lib/action_view/rendering.rb:82:in `render_to_body'\n[bundle].../gems/actionpack-4.1.14/lib/action_controller/metal/rendering.rb:32:in `render_to_body'\n[bundle].../gems/actionpack-4.1.14/lib/action_controller/metal/renderers.rb:32:in `render_to_body'\n[bundle].../gems/actionpack-4.1.14/lib/abstract_controller/rendering.rb:25:in `render'\n[bundle].../gems/actionpack-4.1.14/lib/action_controller/metal/rendering.rb:16:in `render'\n[bundle].../gems/actionpack-4.1.14/lib/action_controller/metal/instrumentation.rb:44:in `block (2 levels) in render'\n[bundle].../gems/activesupport-4.1.14/lib/active_support/core_ext/benchmark.rb:12:in `block in ms'\n/usr/lib/ruby/2.1.0/benchmark.rb:294:in `realtime'\n[bundle].../gems/activesupport-4.1.14/lib/active_support/core_ext/benchmark.rb:12:in `ms'\n[bundle].../gems/actionpack-4.1.14/lib/action_controller/metal/instrumentation.rb:44:in `block in render'\n[bundle].../gems/actionpack-4.1.14/lib/action_controller/metal/instrumentation.rb:87:in `cleanup_view_runtime'\n[bundle].../gems/activerecord-4.1.14/lib/active_record/railties/controller_runtime.rb:25:in `cleanup_view_runtime'\n[bundle].../gems/actionpack-4.1.14/lib/action_controller/metal/instrumentation.rb:43:in `render'\n[bundle].../gems/actionpack-4.1.14/lib/action_controller/metal/implicit_render.rb:10:in `default_render'\n[bundle].../gems/actionpack-4.1.14/lib/action_controller/metal/responder.rb:238:in `default_render'\n[bundle].../gems/actionpack-4.1.14/lib/action_controller/metal/responder.rb:165:in `to_html'\n[bundle].../gems/actionpack-4.1.14/lib/action_controller/metal/responder.rb:158:in `respond'\n[bundle].../gems/actionpack-4.1.14/lib/action_controller/metal/responder.rb:151:in `call'\n[bundle].../gems/actionpack-4.1.14/lib/action_controller/metal/mime_responds.rb:400:in `respond_with'\n<a href='https://github.com/ashu1061/footy/blob/0c0882f21f5ccecfc69f4546115feec053ca3071/app/controllers/user_controller.rb#L29'>[app].../app/controllers/user_controller.rb:29:in `block (2 levels) in frequent_users'</a>\n[bundle].../gems/actionpack-4.1.14/lib/action_controller/metal/mime_responds.rb:258:in `call'\n[bundle].../gems/actionpack-4.1.14/lib/action_controller/metal/mime_responds.rb:258:in `respond_to'\n<a href='https://github.com/ashu1061/footy/blob/0c0882f21f5ccecfc69f4546115feec053ca3071/app/controllers/user_controller.rb#L22'>[app].../app/controllers/user_controller.rb:22:in `frequent_users'</a>\n[bundle].../gems/actionpack-4.1.14/lib/action_controller/metal/implicit_render.rb:4:in `send_action'\n[bundle].../gems/actionpack-4.1.14/lib/abstract_controller/base.rb:189:in `process_action'\n[bundle].../gems/actionpack-4.1.14/lib/action_controller/metal/rendering.rb:10:in `process_action'\n[bundle].../gems/actionpack-4.1.14/lib/abstract_controller/callbacks.rb:20:in `block in process_action'\n[bundle].../gems/activesupport-4.1.14/lib/active_support/callbacks.rb:113:in `call'\n[bundle].../gems/activesupport-4.1.14/lib/active_support/callbacks.rb:113:in `call'\n[bundle].../gems/activesupport-4.1.14/lib/active_support/callbacks.rb:552:in `block (2 levels) in compile'\n[bundle].../gems/activesupport-4.1.14/lib/active_support/callbacks.rb:502:in `call'\n[bundle].../gems/activesupport-4.1.14/lib/active_support/callbacks.rb:502:in `call'\n[bundle].../gems/activesupport-4.1.14/lib/active_support/callbacks.rb:495:in `block (2 levels) in around'\n[bundle].../gems/activesupport-4.1.14/lib/active_support/callbacks.rb:306:in `call'\n[bundle].../gems/activesupport-4.1.14/lib/active_support/callbacks.rb:306:in `block (2 levels) in halting'\n[bundle].../gems/rails-observers-0.1.2/lib/rails/observers/action_controller/caching/sweeping.rb:73:in `around'\n[bundle].../gems/activesupport-4.1.14/lib/active_support/callbacks.rb:452:in `public_send'\n[bundle].../gems/activesupport-4.1.14/lib/active_support/callbacks.rb:452:in `block in make_lambda'\n[bundle].../gems/activesupport-4.1.14/lib/active_support/callbacks.rb:305:in `call'\n[bundle].../gems/activesupport-4.1.14/lib/active_support/callbacks.rb:305:in `block in halting'\n[bundle].../gems/activesupport-4.1.14/lib/active_support/callbacks.rb:494:in `call'\n[bundle].../gems/activesupport-4.1.14/lib/active_support/callbacks.rb:494:in `block in around'\n[bundle].../gems/activesupport-4.1.14/lib/active_support/callbacks.rb:502:in `call'\n[bundle].../gems/activesupport-4.1.14/lib/active_support/callbacks.rb:502:in `call'\n[bundle].../gems/activesupport-4.1.14/lib/active_support/callbacks.rb:86:in `run_callbacks'\n[bundle].../gems/actionpack-4.1.14/lib/abstract_controller/callbacks.rb:19:in `process_action'\n[bundle].../gems/actionpack-4.1.14/lib/action_controller/metal/rescue.rb:29:in `process_action'\n[bundle].../gems/actionpack-4.1.14/lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'\n[bundle].../gems/activesupport-4.1.14/lib/active_support/notifications.rb:159:in `block in instrument'\n[bundle].../gems/activesupport-4.1.14/lib/active_support/notifications/instrumenter.rb:20:in `instrument'\n[bundle].../gems/activesupport-4.1.14/lib/active_support/notifications.rb:159:in `instrument'\n[bundle].../gems/actionpack-4.1.14/lib/action_controller/metal/instrumentation.rb:30:in `process_action'\n[bundle].../gems/actionpack-4.1.14/lib/action_controller/metal/params_wrapper.rb:250:in `process_action'\n[bundle].../gems/activerecord-4.1.14/lib/active_record/railties/controller_runtime.rb:18:in `process_action'\n[bundle].../gems/actionpack-4.1.14/lib/abstract_controller/base.rb:136:in `process'\n[bundle].../gems/actionview-4.1.14/lib/action_view/rendering.rb:30:in `process'\n[bundle].../gems/actionpack-4.1.14/lib/action_controller/metal.rb:196:in `dispatch'\n[bundle].../gems/actionpack-4.1.14/lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'\n[bundle].../gems/actionpack-4.1.14/lib/action_controller/metal.rb:232:in `block in action'\n[bundle].../gems/actionpack-4.1.14/lib/action_dispatch/routing/route_set.rb:82:in `call'\n[bundle].../gems/actionpack-4.1.14/lib/action_dispatch/routing/route_set.rb:82:in `dispatch'\n[bundle].../gems/actionpack-4.1.14/lib/action_dispatch/routing/route_set.rb:50:in `call'\n[bundle].../gems/actionpack-4.1.14/lib/action_dispatch/journey/router.rb:73:in `block in call'\n[bundle].../gems/actionpack-4.1.14/lib/action_dispatch/journey/router.rb:59:in `each'\n[bundle].../gems/actionpack-4.1.14/lib/action_dispatch/journey/router.rb:59:in `call'\n[bundle].../gems/actionpack-4.1.14/lib/action_dispatch/routing/route_set.rb:692:in `call'\n[bundle].../bundler/gems/party_foul-7467951b0c17/lib/party_foul/middleware.rb:8:in `call'\n[bundle].../gems/warden-1.2.6/lib/warden/manager.rb:35:in `block in call'\n[bundle].../gems/warden-1.2.6/lib/warden/manager.rb:34:in `catch'\n[bundle].../gems/warden-1.2.6/lib/warden/manager.rb:34:in `call'\n[bundle].../gems/rack-1.5.5/lib/rack/etag.rb:23:in `call'\n[bundle].../gems/rack-1.5.5/lib/rack/conditionalget.rb:25:in `call'\n[bundle].../gems/rack-1.5.5/lib/rack/head.rb:11:in `call'\n[bundle].../gems/actionpack-4.1.14/lib/action_dispatch/middleware/params_parser.rb:27:in `call'\n[bundle].../gems/actionpack-4.1.14/lib/action_dispatch/middleware/flash.rb:254:in `call'\n[bundle].../gems/rack-1.5.5/lib/rack/session/abstract/id.rb:225:in `context'\n[bundle].../gems/rack-1.5.5/lib/rack/session/abstract/id.rb:220:in `call'\n[bundle].../gems/actionpack-4.1.14/lib/action_dispatch/middleware/cookies.rb:562:in `call'\n[bundle].../gems/activerecord-4.1.14/lib/active_record/query_cache.rb:36:in `call'\n[bundle].../gems/activerecord-4.1.14/lib/active_record/connection_adapters/abstract/connection_pool.rb:621:in `call'\n[bundle].../gems/actionpack-4.1.14/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'\n[bundle].../gems/activesupport-4.1.14/lib/active_support/callbacks.rb:82:in `run_callbacks'\n[bundle].../gems/actionpack-4.1.14/lib/action_dispatch/middleware/callbacks.rb:27:in `call'\n[bundle].../gems/actionpack-4.1.14/lib/action_dispatch/middleware/remote_ip.rb:76:in `call'\n[bundle].../gems/actionpack-4.1.14/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'\n[bundle].../gems/actionpack-4.1.14/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'\n[bundle].../gems/railties-4.1.14/lib/rails/rack/logger.rb:38:in `call_app'\n[bundle].../gems/railties-4.1.14/lib/rails/rack/logger.rb:20:in `block in call'\n[bundle].../gems/activesupport-4.1.14/lib/active_support/tagged_logging.rb:68:in `block in tagged'\n[bundle].../gems/activesupport-4.1.14/lib/active_support/tagged_logging.rb:26:in `tagged'\n[bundle].../gems/activesupport-4.1.14/lib/active_support/tagged_logging.rb:68:in `tagged'\n[bundle].../gems/railties-4.1.14/lib/rails/rack/logger.rb:20:in `call'\n[bundle].../gems/actionpack-4.1.14/lib/action_dispatch/middleware/request_id.rb:21:in `call'\n[bundle].../gems/rack-1.5.5/lib/rack/methodoverride.rb:21:in `call'\n[bundle].../gems/rack-1.5.5/lib/rack/runtime.rb:17:in `call'\n[bundle].../gems/activesupport-4.1.14/lib/active_support/cache/strategy/local_cache_middleware.rb:26:in `call'\n[bundle].../gems/actionpack-4.1.14/lib/action_dispatch/middleware/static.rb:84:in `call'\n[bundle].../gems/rack-1.5.5/lib/rack/sendfile.rb:112:in `call'\n[bundle].../gems/railties-4.1.14/lib/rails/engine.rb:514:in `call'\n[bundle].../gems/railties-4.1.14/lib/rails/application.rb:144:in `call'\n[bundle].../gems/unicorn-5.1.0/lib/unicorn/http_server.rb:562:in `process_client'\n[bundle].../gems/unicorn-5.1.0/lib/unicorn/http_server.rb:658:in `worker_loop'\n[bundle].../gems/unicorn-5.1.0/lib/unicorn/http_server.rb:508:in `spawn_missing_workers'\n[bundle].../gems/unicorn-5.1.0/lib/unicorn/http_server.rb:132:in `start'\n[bundle].../gems/unicorn-5.1.0/bin/unicorn:126:in `<top (required)>'\n[bundle].../bin/unicorn:23:in `load'\n[bundle].../bin/unicorn:23:in `<main>'</pre>\nFingerprint: `86fd4211775d4481ed6bef2ca477f2cb4d17d2be`\n"},"comment":{"url":"https://api.github.com/repos/ashu1061/footy/issues/comments/220773262","html_url":"https://github.com/ashu1061/footy/issues/10#issuecomment-220773262","issue_url":"https://api.github.com/repos/ashu1061/footy/issues/10","id":220773262,"user":{"login":"ashu1061","id":12577416,"avatar_url":"https://avatars.githubusercontent.com/u/12577416?v=3","gravatar_id":"","url":"https://api.github.com/users/ashu1061","html_url":"https://github.com/ashu1061","followers_url":"https://api.github.com/users/ashu1061/followers","following_url":"https://api.github.com/users/ashu1061/following{/other_user}","gists_url":"https://api.github.com/users/ashu1061/gists{/gist_id}","starred_url":"https://api.github.com/users/ashu1061/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ashu1061/subscriptions","organizations_url":"https://api.github.com/users/ashu1061/orgs","repos_url":"https://api.github.com/users/ashu1061/repos","events_url":"https://api.github.com/users/ashu1061/events{/privacy}","received_events_url":"https://api.github.com/users/ashu1061/received_events","type":"User","site_admin":false},"created_at":"2016-05-21T11:41:31Z","updated_at":"2016-05-21T11:41:31Z","body":"<table><tr><th>Occurred At</th><td>May 21, 2016 17:11:30 +0530</td></tr><tr><th>URL</th><td>[GET] /user/frequent_users</td></tr><tr><th>Params</th><td><table><tr><th>action</th><td>frequent_users</td></tr><tr><th>controller</th><td>user</td></tr></table></td></tr><tr><th>Session</th><td><table><tr><th>session_id</th><td>a63c38e5bcc28f98d03456083d8516e5</td></tr><tr><th>administrator_return_to</th><td>/</td></tr><tr><th>warden.user.administrator.key</th><td>[[2], &quot;$2a$10$u9jforhC/9vmw.cC0yj4sO&quot;]</td></tr></table></td></tr><tr><th>IP Address</th><td>&lt;a href=&#39;http://ipinfo.io/122.179.171.219&#39;&gt;122.179.171.219&lt;/a&gt;</td></tr><tr><th>HTTP Headers</th><td><table><tr><th>Version</th><td>HTTP/1.0</td></tr><tr><th>User Agent</th><td>Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0</td></tr><tr><th>Accept Encoding</th><td>gzip, deflate</td></tr><tr><th>Accept</th><td>text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8</td></tr></table></td></tr></table>"}}
{"actor":{"display_login":"ashu1061"}}