{"action":"closed","issue":{"url":"https://api.github.com/repos/shubhamgupta731/dictionary/issues/7","labels_url":"https://api.github.com/repos/shubhamgupta731/dictionary/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/shubhamgupta731/dictionary/issues/7/comments","events_url":"https://api.github.com/repos/shubhamgupta731/dictionary/issues/7/events","html_url":"https://github.com/shubhamgupta731/dictionary/issues/7","id":99186141,"number":7,"title":"OrdersController#get_estimated_price (ActiveRecord::StatementInvalid) \"PG::InternalError: ERROR:  parse error - invalid geometry\nHINT:  \"POINT( )\" <-- parse error at position 9 within geometry\n: SELECT \"drivers\".* FROM \"drivers\" LEFT OUTER JOIN shifts ON drivers.last_shift_id = shifts.id WHERE \"drivers\".\"deleted_at\" IS NULL AND \"drivers\".\"active_status\" = 0 AND \"drivers\".\"suspend_status\" = 0 AND \"drivers\".\"on_leave_today_flag\" = 0 AND \"drivers\".\"login_status\" = 1 AND \"drivers\".\"status\" = 0 AND (app_version >= 17) AND (last_location_updated_at > '2015-08-05 10:45:24.499567') AND (drivers.app_version < 20 OR drivers.engagement_type = 3 OR ( shifts.id IS NOT NULL AND shifts.status = 0 AND shifts.planned_end_datetime > '2015-08-05 11:45:24.503961')) AND \"drivers\".\"geo_region_id\" = 1 AND \"drivers\".\"vehicle_id\" = 1 AND \"drivers\".\"engagement_type\" IN (0, 3) AND (ST_Distance_Sphere(last_location, ST_GeomFromText('POINT(0.0 0.0)', 4326)) <= 10000.0) AND (1=1)  ORDER BY ST_Distance_Sphere(last_location, ST_GeomFromText","user":{"login":"no-reply-porter","id":13627941,"avatar_url":"https://avatars.githubusercontent.com/u/13627941?v=3","gravatar_id":"","url":"https://api.github.com/users/no-reply-porter","html_url":"https://github.com/no-reply-porter","followers_url":"https://api.github.com/users/no-reply-porter/followers","following_url":"https://api.github.com/users/no-reply-porter/following{/other_user}","gists_url":"https://api.github.com/users/no-reply-porter/gists{/gist_id}","starred_url":"https://api.github.com/users/no-reply-porter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/no-reply-porter/subscriptions","organizations_url":"https://api.github.com/users/no-reply-porter/orgs","repos_url":"https://api.github.com/users/no-reply-porter/repos","events_url":"https://api.github.com/users/no-reply-porter/events{/privacy}","received_events_url":"https://api.github.com/users/no-reply-porter/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-05T11:45:27Z","updated_at":"2015-08-07T08:30:25Z","closed_at":"2015-08-07T08:30:25Z","body":"<table><tr><th>Exception</th><td>PG::InternalError: ERROR:  parse error - invalid geometry\nHINT:  &quot;POINT( )&quot; &lt;-- parse error at position 9 within geometry\n: SELECT &quot;drivers&quot;.* FROM &quot;drivers&quot; LEFT OUTER JOIN shifts ON drivers.last_shift_id = shifts.id WHERE &quot;drivers&quot;.&quot;deleted_at&quot; IS NULL AND &quot;drivers&quot;.&quot;active_status&quot; = 0 AND &quot;drivers&quot;.&quot;suspend_status&quot; = 0 AND &quot;drivers&quot;.&quot;on_leave_today_flag&quot; = 0 AND &quot;drivers&quot;.&quot;login_status&quot; = 1 AND &quot;drivers&quot;.&quot;status&quot; = 0 AND (app_version &gt;= 17) AND (last_location_updated_at &gt; &#39;2015-08-05 10:45:24.499567&#39;) AND (drivers.app_version &lt; 20 OR drivers.engagement_type = 3 OR ( shifts.id IS NOT NULL AND shifts.status = 0 AND shifts.planned_end_datetime &gt; &#39;2015-08-05 11:45:24.503961&#39;)) AND &quot;drivers&quot;.&quot;geo_region_id&quot; = 1 AND &quot;drivers&quot;.&quot;vehicle_id&quot; = 1 AND &quot;drivers&quot;.&quot;engagement_type&quot; IN (0, 3) AND (ST_Distance_Sphere(last_location, ST_GeomFromText(&#39;POINT(0.0 0.0)&#39;, 4326)) &lt;= 10000.0) AND (1=1)  ORDER BY ST_Distance_Sphere(last_location, ST_GeomFromText(&#39;POINT( )&#39;, 4326))</td></tr><tr><th>Last Occurrence</th><td>August 05, 2015 17:15:26 +0530</td></tr><tr><th>Count</th><td>1</td></tr></table>\n\n## Stack Trace\n<pre>[bundle].../gems/activerecord-4.1.2/lib/active_record/connection_adapters/postgresql_adapter.rb:822:in `async_exec'\n[bundle].../gems/activerecord-4.1.2/lib/active_record/connection_adapters/postgresql_adapter.rb:822:in `block in exec_no_cache'\n[bundle].../gems/activerecord-4.1.2/lib/active_record/connection_adapters/abstract_adapter.rb:373:in `block in log'\n[bundle].../gems/activesupport-4.1.2/lib/active_support/notifications/instrumenter.rb:20:in `instrument'\n[bundle].../gems/activerecord-4.1.2/lib/active_record/connection_adapters/abstract_adapter.rb:367:in `log'\n[bundle].../gems/activerecord-4.1.2/lib/active_record/connection_adapters/postgresql_adapter.rb:822:in `exec_no_cache'\n[bundle].../gems/activerecord-4.1.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:137:in `exec_query'\n[bundle].../gems/activerecord-4.1.2/lib/active_record/connection_adapters/postgresql_adapter.rb:954:in `select'\n[bundle].../gems/activerecord-4.1.2/lib/active_record/connection_adapters/abstract/database_statements.rb:24:in `select_all'\n[bundle].../gems/activerecord-4.1.2/lib/active_record/connection_adapters/abstract/query_cache.rb:68:in `block in select_all'\n[bundle].../gems/activerecord-4.1.2/lib/active_record/connection_adapters/abstract/query_cache.rb:83:in `cache_sql'\n[bundle].../gems/activerecord-4.1.2/lib/active_record/connection_adapters/abstract/query_cache.rb:68:in `select_all'\n[bundle].../gems/activerecord-4.1.2/lib/active_record/querying.rb:39:in `find_by_sql'\n[bundle].../gems/activerecord-4.1.2/lib/active_record/relation.rb:604:in `exec_queries'\n[bundle].../gems/activerecord-4.1.2/lib/active_record/relation.rb:486:in `load'\n[bundle].../gems/activerecord-4.1.2/lib/active_record/relation.rb:231:in `to_a'\n[bundle].../gems/activerecord-4.1.2/lib/active_record/relation/delegation.rb:46:in `each'\n<a href='https://github.com/shubhamgupta731/dictionary/blob/af867932ebac3802188f3a294c1649b4fe114696/app/models/driver.rb#L836'>[app].../app/models/driver.rb:836:in `get_ranked_drivers'</a>\n<a href='https://github.com/shubhamgupta731/dictionary/blob/af867932ebac3802188f3a294c1649b4fe114696/app/controllers/orders_controller.rb#L166'>[app].../app/controllers/orders_controller.rb:166:in `block in get_estimated_price'</a>\n<a href='https://github.com/shubhamgupta731/dictionary/blob/af867932ebac3802188f3a294c1649b4fe114696/app/controllers/orders_controller.rb#L130'>[app].../app/controllers/orders_controller.rb:130:in `each'</a>\n<a href='https://github.com/shubhamgupta731/dictionary/blob/af867932ebac3802188f3a294c1649b4fe114696/app/controllers/orders_controller.rb#L130'>[app].../app/controllers/orders_controller.rb:130:in `get_estimated_price'</a>\n[bundle].../gems/actionpack-4.1.2/lib/action_controller/metal/implicit_render.rb:4:in `send_action'\n[bundle].../gems/actionpack-4.1.2/lib/abstract_controller/base.rb:189:in `process_action'\n[bundle].../gems/actionpack-4.1.2/lib/action_controller/metal/rendering.rb:10:in `process_action'\n[bundle].../gems/actionpack-4.1.2/lib/abstract_controller/callbacks.rb:20:in `block in process_action'\n[bundle].../gems/activesupport-4.1.2/lib/active_support/callbacks.rb:113:in `call'\n[bundle].../gems/activesupport-4.1.2/lib/active_support/callbacks.rb:113:in `call'\n[bundle].../gems/activesupport-4.1.2/lib/active_support/callbacks.rb:166:in `block in halting'\n[bundle].../gems/activesupport-4.1.2/lib/active_support/callbacks.rb:149:in `call'\n[bundle].../gems/activesupport-4.1.2/lib/active_support/callbacks.rb:149:in `block in halting_and_conditional'\n[bundle].../gems/activesupport-4.1.2/lib/active_support/callbacks.rb:229:in `call'\n[bundle].../gems/activesupport-4.1.2/lib/active_support/callbacks.rb:229:in `block in halting'\n[bundle].../gems/activesupport-4.1.2/lib/active_support/callbacks.rb:229:in `call'\n[bundle].../gems/activesupport-4.1.2/lib/active_support/callbacks.rb:229:in `block in halting'\n[bundle].../gems/activesupport-4.1.2/lib/active_support/callbacks.rb:229:in `call'\n[bundle].../gems/activesupport-4.1.2/lib/active_support/callbacks.rb:229:in `block in halting'\n[bundle].../gems/activesupport-4.1.2/lib/active_support/callbacks.rb:166:in `call'\n[bundle].../gems/activesupport-4.1.2/lib/active_support/callbacks.rb:166:in `block in halting'\n[bundle].../gems/activesupport-4.1.2/lib/active_support/callbacks.rb:166:in `call'\n[bundle].../gems/activesupport-4.1.2/lib/active_support/callbacks.rb:166:in `block in halting'\n[bundle].../gems/activesupport-4.1.2/lib/active_support/callbacks.rb:229:in `call'\n[bundle].../gems/activesupport-4.1.2/lib/active_support/callbacks.rb:229:in `block in halting'\n[bundle].../gems/activesupport-4.1.2/lib/active_support/callbacks.rb:299:in `call'\n[bundle].../gems/activesupport-4.1.2/lib/active_support/callbacks.rb:299: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.2/lib/active_support/callbacks.rb:447:in `public_send'\n[bundle].../gems/activesupport-4.1.2/lib/active_support/callbacks.rb:447:in `block in make_lambda'\n[bundle].../gems/activesupport-4.1.2/lib/active_support/callbacks.rb:298:in `call'\n[bundle].../gems/activesupport-4.1.2/lib/active_support/callbacks.rb:298:in `block in halting'\n[bundle].../gems/activesupport-4.1.2/lib/active_support/callbacks.rb:166:in `call'\n[bundle].../gems/activesupport-4.1.2/lib/active_support/callbacks.rb:166:in `block in halting'\n[bundle].../gems/activesupport-4.1.2/lib/active_support/callbacks.rb:86:in `call'\n[bundle].../gems/activesupport-4.1.2/lib/active_support/callbacks.rb:86:in `run_callbacks'\n[bundle].../gems/actionpack-4.1.2/lib/abstract_controller/callbacks.rb:19:in `process_action'\n[bundle].../gems/actionpack-4.1.2/lib/action_controller/metal/rescue.rb:29:in `process_action'\n[bundle].../gems/actionpack-4.1.2/lib/action_controller/metal/instrumentation.rb:31:in `block in process_action'\n[bundle].../gems/activesupport-4.1.2/lib/active_support/notifications.rb:159:in `block in instrument'\n[bundle].../gems/activesupport-4.1.2/lib/active_support/notifications/instrumenter.rb:20:in `instrument'\n[bundle].../gems/activesupport-4.1.2/lib/active_support/notifications.rb:159:in `instrument'\n[bundle].../gems/actionpack-4.1.2/lib/action_controller/metal/instrumentation.rb:30:in `process_action'\n[bundle].../gems/actionpack-4.1.2/lib/action_controller/metal/params_wrapper.rb:250:in `process_action'\n[bundle].../gems/activerecord-4.1.2/lib/active_record/railties/controller_runtime.rb:18:in `process_action'\n[bundle].../gems/actionpack-4.1.2/lib/abstract_controller/base.rb:136:in `process'\n[bundle].../gems/actionview-4.1.2/lib/action_view/rendering.rb:30:in `process'\n[bundle].../gems/actionpack-4.1.2/lib/action_controller/metal.rb:196:in `dispatch'\n[bundle].../gems/actionpack-4.1.2/lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'\n[bundle].../gems/actionpack-4.1.2/lib/action_controller/metal.rb:232:in `block in action'\n[bundle].../gems/actionpack-4.1.2/lib/action_dispatch/routing/route_set.rb:82:in `call'\n[bundle].../gems/actionpack-4.1.2/lib/action_dispatch/routing/route_set.rb:82:in `dispatch'\n[bundle].../gems/actionpack-4.1.2/lib/action_dispatch/routing/route_set.rb:50:in `call'\n[bundle].../gems/actionpack-4.1.2/lib/action_dispatch/journey/router.rb:71:in `block in call'\n[bundle].../gems/actionpack-4.1.2/lib/action_dispatch/journey/router.rb:59:in `each'\n[bundle].../gems/actionpack-4.1.2/lib/action_dispatch/journey/router.rb:59:in `call'\n[bundle].../gems/actionpack-4.1.2/lib/action_dispatch/routing/route_set.rb:678:in `call'\n[bundle].../gems/newrelic_rpm-3.12.1.298/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'\n[bundle].../gems/newrelic_rpm-3.12.1.298/lib/new_relic/rack/agent_hooks.rb:30:in `traced_call'\n[bundle].../gems/newrelic_rpm-3.12.1.298/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'\n[bundle].../gems/newrelic_rpm-3.12.1.298/lib/new_relic/rack/browser_monitoring.rb:32:in `traced_call'\n[bundle].../gems/newrelic_rpm-3.12.1.298/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'\n[bundle].../bundler/gems/party_foul-7467951b0c17/lib/party_foul/middleware.rb:8:in `call'\n[bundle].../gems/newrelic_rpm-3.12.1.298/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'\n[bundle].../gems/rack-1.5.5/lib/rack/deflater.rb:25:in `call'\n[bundle].../gems/newrelic_rpm-3.12.1.298/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'\n[bundle].../gems/warden-1.2.3/lib/warden/manager.rb:35:in `block in call'\n[bundle].../gems/warden-1.2.3/lib/warden/manager.rb:34:in `catch'\n[bundle].../gems/warden-1.2.3/lib/warden/manager.rb:34:in `call'\n[bundle].../gems/newrelic_rpm-3.12.1.298/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'\n[bundle].../gems/rack-1.5.5/lib/rack/etag.rb:23:in `call'\n[bundle].../gems/newrelic_rpm-3.12.1.298/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'\n[bundle].../gems/rack-1.5.5/lib/rack/conditionalget.rb:25:in `call'\n[bundle].../gems/newrelic_rpm-3.12.1.298/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'\n[bundle].../gems/rack-1.5.5/lib/rack/head.rb:11:in `call'\n[bundle].../gems/newrelic_rpm-3.12.1.298/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'\n[bundle].../gems/actionpack-4.1.2/lib/action_dispatch/middleware/params_parser.rb:27:in `call'\n[bundle].../gems/newrelic_rpm-3.12.1.298/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'\n[bundle].../gems/actionpack-4.1.2/lib/action_dispatch/middleware/flash.rb:254:in `call'\n[bundle].../gems/newrelic_rpm-3.12.1.298/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67: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/newrelic_rpm-3.12.1.298/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'\n[bundle].../gems/actionpack-4.1.2/lib/action_dispatch/middleware/cookies.rb:560:in `call'\n[bundle].../gems/newrelic_rpm-3.12.1.298/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'\n[bundle].../gems/activerecord-4.1.2/lib/active_record/query_cache.rb:36:in `call'\n[bundle].../gems/newrelic_rpm-3.12.1.298/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'\n[bundle].../gems/activerecord-4.1.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:621:in `call'\n[bundle].../gems/newrelic_rpm-3.12.1.298/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'\n[bundle].../gems/activerecord-4.1.2/lib/active_record/migration.rb:380:in `call'\n[bundle].../gems/newrelic_rpm-3.12.1.298/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'\n[bundle].../gems/actionpack-4.1.2/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'\n[bundle].../gems/activesupport-4.1.2/lib/active_support/callbacks.rb:82:in `run_callbacks'\n[bundle].../gems/actionpack-4.1.2/lib/action_dispatch/middleware/callbacks.rb:27:in `call'\n[bundle].../gems/newrelic_rpm-3.12.1.298/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'\n[bundle].../gems/actionpack-4.1.2/lib/action_dispatch/middleware/reloader.rb:73:in `call'\n[bundle].../gems/newrelic_rpm-3.12.1.298/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'\n[bundle].../gems/actionpack-4.1.2/lib/action_dispatch/middleware/remote_ip.rb:76:in `call'\n[bundle].../gems/newrelic_rpm-3.12.1.298/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'\n[bundle].../gems/actionpack-4.1.2/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'\n[bundle].../gems/newrelic_rpm-3.12.1.298/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'\n[bundle].../gems/web-console-2.2.1/lib/web_console/middleware.rb:39:in `call'\n[bundle].../gems/newrelic_rpm-3.12.1.298/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'\n[bundle].../gems/actionpack-4.1.2/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'\n[bundle].../gems/newrelic_rpm-3.12.1.298/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'\n[bundle].../gems/railties-4.1.2/lib/rails/rack/logger.rb:38:in `call_app'\n[bundle].../gems/railties-4.1.2/lib/rails/rack/logger.rb:22:in `call'\n[bundle].../gems/newrelic_rpm-3.12.1.298/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'\n[bundle].../gems/actionpack-4.1.2/lib/action_dispatch/middleware/request_id.rb:21:in `call'\n[bundle].../gems/newrelic_rpm-3.12.1.298/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'\n[bundle].../gems/rack-1.5.5/lib/rack/methodoverride.rb:21:in `call'\n[bundle].../gems/newrelic_rpm-3.12.1.298/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'\n[bundle].../gems/rack-1.5.5/lib/rack/runtime.rb:17:in `call'\n[bundle].../gems/newrelic_rpm-3.12.1.298/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'\n[bundle].../gems/activesupport-4.1.2/lib/active_support/cache/strategy/local_cache_middleware.rb:26:in `call'\n[bundle].../gems/newrelic_rpm-3.12.1.298/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'\n[bundle].../gems/rack-1.5.5/lib/rack/lock.rb:17:in `call'\n[bundle].../gems/newrelic_rpm-3.12.1.298/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'\n[bundle].../gems/actionpack-4.1.2/lib/action_dispatch/middleware/static.rb:64:in `call'\n[bundle].../gems/newrelic_rpm-3.12.1.298/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'\n[bundle].../gems/rack-1.5.5/lib/rack/sendfile.rb:112:in `call'\n[bundle].../gems/newrelic_rpm-3.12.1.298/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'\n[bundle].../gems/railties-4.1.2/lib/rails/engine.rb:514:in `call'\n[bundle].../gems/railties-4.1.2/lib/rails/application.rb:144:in `call'\n[bundle].../gems/newrelic_rpm-3.12.1.298/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'\n[bundle].../gems/rack-1.5.5/lib/rack/lock.rb:17:in `call'\n[bundle].../gems/rack-1.5.5/lib/rack/content_length.rb:14:in `call'\n[bundle].../gems/rack-1.5.5/lib/rack/handler/webrick.rb:60:in `service'\n/usr/local/Cellar/ruby/2.2.1/lib/ruby/2.2.0/webrick/httpserver.rb:138:in `service'\n/usr/local/Cellar/ruby/2.2.1/lib/ruby/2.2.0/webrick/httpserver.rb:94:in `run'\n/usr/local/Cellar/ruby/2.2.1/lib/ruby/2.2.0/webrick/server.rb:294:in `block in start_thread'</pre>\nFingerprint: `cdd1c00c376e59e03a5abf899ec2f8bd1f38e421`\n"}}