{"action":"created","issue":{"url":"https://api.github.com/repos/activeadmin/activeadmin/issues/4078","labels_url":"https://api.github.com/repos/activeadmin/activeadmin/issues/4078/labels{/name}","comments_url":"https://api.github.com/repos/activeadmin/activeadmin/issues/4078/comments","events_url":"https://api.github.com/repos/activeadmin/activeadmin/issues/4078/events","html_url":"https://github.com/activeadmin/activeadmin/issues/4078","id":101425451,"number":4078,"title":"Bad SQL creation from a filter","user":{"login":"jasonm23","id":71587,"avatar_url":"https://avatars.githubusercontent.com/u/71587?v=3","gravatar_id":"","url":"https://api.github.com/users/jasonm23","html_url":"https://github.com/jasonm23","followers_url":"https://api.github.com/users/jasonm23/followers","following_url":"https://api.github.com/users/jasonm23/following{/other_user}","gists_url":"https://api.github.com/users/jasonm23/gists{/gist_id}","starred_url":"https://api.github.com/users/jasonm23/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasonm23/subscriptions","organizations_url":"https://api.github.com/users/jasonm23/orgs","repos_url":"https://api.github.com/users/jasonm23/repos","events_url":"https://api.github.com/users/jasonm23/events{/privacy}","received_events_url":"https://api.github.com/users/jasonm23/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-08-17T13:54:11Z","updated_at":"2015-08-17T14:40:23Z","closed_at":null,"body":"When doing a filter on email (contains) I'm getting the following error (see below).\r\n\r\n(please note: already updated the gem to git head, problem still occurs.)\r\n\r\nAny help would be much appreciated.\r\n\r\nexcerpt from stacktrace:\r\n\r\n```\r\nSELECT COUNT(count_column) FROM (SELECT  1 AS count_column FROM \"users\" WHERE \"users\".\"deleted_at\" IS NULL AND (\"users\".\"email\" >> '---\r\n- jas\r\n') LIMIT 30 OFFSET 0) subquery_for_count\r\nPG::UndefinedFunction: ERROR:  operator does not exist: character varying >> unknown\r\nLINE 1: ...RE \"users\".\"deleted_at\" IS NULL AND (\"users\".\"email\" >> '---\r\n                                                                ^\r\nHINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.\r\n: SELECT COUNT(count_column) FROM (SELECT  1 AS count_column FROM \"users\" WHERE \"users\".\"deleted_at\" IS NULL AND (\"users\".\"email\" >> '---\r\n- jas\r\n') LIMIT 30 OFFSET 0) subquery_for_count\r\n  Rendered /Users/neo/.rvm/gems/ruby-2.2.2@airdrilling/bundler/gems/active_admin-7aef260921d4/app/views/active_admin/resource/index.html.arb (123.4ms)\r\nCompleted 500 Internal Server Error in 172ms\r\n```\r\n\r\n`users.email` from schema.db...\r\n\r\n```\r\nt.string   \"email\",                   limit: 255, default: \"\",    null: false\r\n```\r\n\r\n### Full stack trace\r\n\r\n```\r\nStarted GET \"/admin/users?utf8=%E2%9C%93&q%5Bemail_contains%5D=jas&commit=Filter&order=id_desc\" for 127.0.0.1 at 2015-08-17 21:27:59 +0800\r\n  ActiveRecord::SchemaMigration Load (0.3ms)  SELECT \"schema_migrations\".* FROM \"schema_migrations\"\r\nProcessing by Admin::UsersController#index as HTML\r\n  Parameters: {\"utf8\"=>\"✓\", \"q\"=>{\"email_contains\"=>\"jas\"}, \"commit\"=>\"Filter\", \"order\"=>\"id_desc\"}\r\n  User Load (0.5ms)  SELECT  \"users\".* FROM \"users\" WHERE \"users\".\"deleted_at\" IS NULL AND \"users\".\"id\" = 333  ORDER BY \"users\".\"id\" ASC LIMIT 1  [[\"id\", 333]]\r\n  Role Load (0.2ms)  SELECT  \"roles\".* FROM \"roles\" WHERE \"roles\".\"id\" = 1 LIMIT 1  [[\"id\", 1]]\r\n   (1.5ms)  SELECT COUNT(count_column) FROM (SELECT  1 AS count_column FROM \"users\" WHERE \"users\".\"deleted_at\" IS NULL AND (\"users\".\"email\" >> '---\r\n- jas\r\n') LIMIT 30 OFFSET 0) subquery_for_count\r\nPG::UndefinedFunction: ERROR:  operator does not exist: character varying >> unknown\r\nLINE 1: ...RE \"users\".\"deleted_at\" IS NULL AND (\"users\".\"email\" >> '---\r\n                                                                ^\r\nHINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.\r\n: SELECT COUNT(count_column) FROM (SELECT  1 AS count_column FROM \"users\" WHERE \"users\".\"deleted_at\" IS NULL AND (\"users\".\"email\" >> '---\r\n- jas\r\n') LIMIT 30 OFFSET 0) subquery_for_count\r\n  Rendered /Users/neo/.rvm/gems/ruby-2.2.2@airdrilling/bundler/gems/active_admin-7aef260921d4/app/views/active_admin/resource/index.html.arb (123.4ms)\r\nCompleted 500 Internal Server Error in 172ms\r\n** [Airbrake] Notice was not sent due to configuration:\r\n  Environment Monitored? false\r\n  API key set? false\r\nD, [2015-08-17T21:27:59.890947 #82349] DEBUG -- : [Rollbar] Reporting exception: PG::UndefinedFunction: ERROR:  operator does not exist: character varying >> unknown\r\nLINE 1: ...RE \"users\".\"deleted_at\" IS NULL AND (\"users\".\"email\" >> '---\r\n                                                                ^\r\nHINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.\r\n: SELECT COUNT(count_column) FROM (SELECT  1 AS count_column FROM \"users\" WHERE \"users\".\"deleted_at\" IS NULL AND (\"users\".\"email\" >> '---\r\n- jas\r\n') LIMIT 30 OFFSET 0) subquery_for_count\r\nD, [2015-08-17T21:27:59.891017 #82349] DEBUG -- : [Rollbar] Exception not reported because Rollbar is disabled\r\n\r\nActiveRecord::StatementInvalid - PG::UndefinedFunction: ERROR:  operator does not exist: character varying >> unknown\r\nLINE 1: ...RE \"users\".\"deleted_at\" IS NULL AND (\"users\".\"email\" >> '---\r\n                                                                ^\r\nHINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.\r\n: SELECT COUNT(count_column) FROM (SELECT  1 AS count_column FROM \"users\" WHERE \"users\".\"deleted_at\" IS NULL AND (\"users\".\"email\" >> '---\r\n- jas\r\n') LIMIT 30 OFFSET 0) subquery_for_count:\r\n  activerecord (4.2.0) lib/active_record/connection_adapters/abstract_adapter.rb:455:in `translate_exception_class'\r\n  activerecord (4.2.0) lib/active_record/connection_adapters/abstract_adapter.rb:468:in `rescue in log'\r\n  activerecord (4.2.0) lib/active_record/connection_adapters/abstract_adapter.rb:466:in `log'\r\n  activerecord (4.2.0) lib/active_record/connection_adapters/postgresql_adapter.rb:592:in `exec_no_cache'\r\n  activerecord (4.2.0) lib/active_record/connection_adapters/postgresql_adapter.rb:584:in `execute_and_clear'\r\n  activerecord (4.2.0) lib/active_record/connection_adapters/postgresql/database_statements.rb:160:in `exec_query'\r\n  activerecord (4.2.0) lib/active_record/connection_adapters/abstract/database_statements.rb:336:in `select'\r\n  activerecord (4.2.0) lib/active_record/connection_adapters/abstract/database_statements.rb:32:in `select_all'\r\n  activerecord (4.2.0) lib/active_record/connection_adapters/abstract/query_cache.rb:68:in `block in select_all'\r\n  activerecord (4.2.0) lib/active_record/connection_adapters/abstract/query_cache.rb:83:in `cache_sql'\r\n  activerecord (4.2.0) lib/active_record/connection_adapters/abstract/query_cache.rb:68:in `select_all'\r\n  activerecord (4.2.0) lib/active_record/relation/calculations.rb:264:in `execute_simple_calculation'\r\n  activerecord (4.2.0) lib/active_record/relation/calculations.rb:221:in `perform_calculation'\r\n  activerecord (4.2.0) lib/active_record/relation/calculations.rb:127:in `calculate'\r\n  activerecord (4.2.0) lib/active_record/relation/calculations.rb:42:in `count'\r\n   () Users/neo/.rvm/gems/ruby-2.2.2@airdrilling/bundler/gems/active_admin-7aef260921d4/lib/active_admin/helpers/collection.rb:9:in `collection_size'\r\n   () Users/neo/.rvm/gems/ruby-2.2.2@airdrilling/bundler/gems/active_admin-7aef260921d4/lib/active_admin/helpers/collection.rb:13:in `collection_is_empty?'\r\n   () Users/neo/.rvm/gems/ruby-2.2.2@airdrilling/bundler/gems/active_admin-7aef260921d4/lib/active_admin/views/pages/index.rb:45:in `items_in_collection?'\r\n   () Users/neo/.rvm/gems/ruby-2.2.2@airdrilling/bundler/gems/active_admin-7aef260921d4/lib/active_admin/views/pages/index.rb:49:in `build_collection'\r\n   () Users/neo/.rvm/gems/ruby-2.2.2@airdrilling/bundler/gems/active_admin-7aef260921d4/lib/active_admin/views/pages/index.rb:28:in `block in main_content'\r\n  arbre (1.0.2) lib/arbre/element/builder_methods.rb:31:in `block in build_tag'\r\n  arbre (1.0.2) lib/arbre/context.rb:92:in `with_current_arbre_element'\r\n  arbre (1.0.2) lib/arbre/element/builder_methods.rb:49:in `with_current_arbre_element'\r\n  arbre (1.0.2) lib/arbre/element/builder_methods.rb:26:in `build_tag'\r\n  arbre (1.0.2) lib/arbre/element/builder_methods.rb:39:in `insert_tag'\r\n  arbre (1.0.2) lib/arbre/element/builder_methods.rb:14:in `batch_action_form'\r\n   () Users/neo/.rvm/gems/ruby-2.2.2@airdrilling/bundler/gems/active_admin-7aef260921d4/lib/active_admin/views/pages/index.rb:36:in `wrap_with_batch_action_form'\r\n   () Users/neo/.rvm/gems/ruby-2.2.2@airdrilling/bundler/gems/active_admin-7aef260921d4/lib/active_admin/views/pages/index.rb:26:in `main_content'\r\n   () Users/neo/.rvm/gems/ruby-2.2.2@airdrilling/bundler/gems/active_admin-7aef260921d4/lib/active_admin/views/pages/base.rb:87:in `block (2 levels) in build_main_content_wrapper'\r\n  arbre (1.0.2) lib/arbre/element/builder_methods.rb:31:in `block in build_tag'\r\n  arbre (1.0.2) lib/arbre/context.rb:92:in `with_current_arbre_element'\r\n  arbre (1.0.2) lib/arbre/element/builder_methods.rb:49:in `with_current_arbre_element'\r\n  arbre (1.0.2) lib/arbre/element/builder_methods.rb:26:in `build_tag'\r\n  arbre (1.0.2) lib/arbre/element/builder_methods.rb:39:in `insert_tag'\r\n  arbre (1.0.2) lib/arbre/element/builder_methods.rb:14:in `div'\r\n   () Users/neo/.rvm/gems/ruby-2.2.2@airdrilling/bundler/gems/active_admin-7aef260921d4/lib/active_admin/views/pages/base.rb:86:in `block in build_main_content_wrapper'\r\n  arbre (1.0.2) lib/arbre/element/builder_methods.rb:31:in `block in build_tag'\r\n  arbre (1.0.2) lib/arbre/context.rb:92:in `with_current_arbre_element'\r\n  arbre (1.0.2) lib/arbre/element/builder_methods.rb:49:in `with_current_arbre_element'\r\n  arbre (1.0.2) lib/arbre/element/builder_methods.rb:26:in `build_tag'\r\n  arbre (1.0.2) lib/arbre/element/builder_methods.rb:39:in `insert_tag'\r\n  arbre (1.0.2) lib/arbre/element/builder_methods.rb:14:in `div'\r\n   () Users/neo/.rvm/gems/ruby-2.2.2@airdrilling/bundler/gems/active_admin-7aef260921d4/lib/active_admin/views/pages/base.rb:85:in `build_main_content_wrapper'\r\n   () Users/neo/.rvm/gems/ruby-2.2.2@airdrilling/bundler/gems/active_admin-7aef260921d4/lib/active_admin/views/pages/base.rb:71:in `block in build_page_content'\r\n  arbre (1.0.2) lib/arbre/element/builder_methods.rb:31:in `block in build_tag'\r\n  arbre (1.0.2) lib/arbre/context.rb:92:in `with_current_arbre_element'\r\n  arbre (1.0.2) lib/arbre/element/builder_methods.rb:49:in `with_current_arbre_element'\r\n  arbre (1.0.2) lib/arbre/element/builder_methods.rb:26:in `build_tag'\r\n  arbre (1.0.2) lib/arbre/element/builder_methods.rb:39:in `insert_tag'\r\n  arbre (1.0.2) lib/arbre/element/builder_methods.rb:14:in `div'\r\n   () Users/neo/.rvm/gems/ruby-2.2.2@airdrilling/bundler/gems/active_admin-7aef260921d4/lib/active_admin/views/pages/base.rb:70:in `build_page_content'\r\n   () Users/neo/.rvm/gems/ruby-2.2.2@airdrilling/bundler/gems/active_admin-7aef260921d4/lib/active_admin/views/pages/base.rb:48:in `block (2 levels) in build_page'\r\n  arbre (1.0.2) lib/arbre/element/builder_methods.rb:31:in `block in build_tag'\r\n  arbre (1.0.2) lib/arbre/context.rb:92:in `with_current_arbre_element'\r\n  arbre (1.0.2) lib/arbre/element/builder_methods.rb:49:in `with_current_arbre_element'\r\n  arbre (1.0.2) lib/arbre/element/builder_methods.rb:26:in `build_tag'\r\n  arbre (1.0.2) lib/arbre/element/builder_methods.rb:39:in `insert_tag'\r\n  arbre (1.0.2) lib/arbre/element/builder_methods.rb:14:in `div'\r\n   () Users/neo/.rvm/gems/ruby-2.2.2@airdrilling/bundler/gems/active_admin-7aef260921d4/lib/active_admin/views/pages/base.rb:44:in `block in build_page'\r\n  arbre (1.0.2) lib/arbre/context.rb:92:in `with_current_arbre_element'\r\n  arbre (1.0.2) lib/arbre/element/builder_methods.rb:49:in `with_current_arbre_element'\r\n   () Users/neo/.rvm/gems/ruby-2.2.2@airdrilling/bundler/gems/active_admin-7aef260921d4/lib/active_admin/views/pages/base.rb:43:in `build_page'\r\n   () Users/neo/.rvm/gems/ruby-2.2.2@airdrilling/bundler/gems/active_admin-7aef260921d4/lib/active_admin/views/pages/base.rb:10:in `build'\r\n  arbre (1.0.2) lib/arbre/element/builder_methods.rb:30:in `block in build_tag'\r\n  arbre (1.0.2) lib/arbre/context.rb:92:in `with_current_arbre_element'\r\n  arbre (1.0.2) lib/arbre/element/builder_methods.rb:26:in `build_tag'\r\n  arbre (1.0.2) lib/arbre/element/builder_methods.rb:39:in `insert_tag'\r\n   () Users/neo/.rvm/gems/ruby-2.2.2@airdrilling/bundler/gems/active_admin-7aef260921d4/app/views/active_admin/resource/index.html.arb:2:in `block in ___sers_neo__rvm_gems_ruby_______airdrilling_bundler_gems_active_admin__aef______d__app_views_active_admin_resource_index_html_arb___1845682948105804477_70354850399060'\r\n  arbre (1.0.2) lib/arbre/context.rb:45:in `initialize'\r\n   () Users/neo/.rvm/gems/ruby-2.2.2@airdrilling/bundler/gems/active_admin-7aef260921d4/app/views/active_admin/resource/index.html.arb:1:in `___sers_neo__rvm_gems_ruby_______airdrilling_bundler_gems_active_admin__aef______d__app_views_active_admin_resource_index_html_arb___1845682948105804477_70354850399060'\r\n  actionview (4.2.0) lib/action_view/template.rb:145:in `block in render'\r\n  activesupport (4.2.0) lib/active_support/notifications.rb:164:in `block in instrument'\r\n  activesupport (4.2.0) lib/active_support/notifications/instrumenter.rb:20:in `instrument'\r\n  activesupport (4.2.0) lib/active_support/notifications.rb:164:in `instrument'\r\n  actionview (4.2.0) lib/action_view/template.rb:333:in `instrument'\r\n  actionview (4.2.0) lib/action_view/template.rb:143:in `render'\r\n  haml_coffee_assets (1.16.0) lib/haml_coffee_assets/rails/engine.rb:73:in `render'\r\n  actionview (4.2.0) lib/action_view/renderer/template_renderer.rb:54:in `block (2 levels) in render_template'\r\n  actionview (4.2.0) lib/action_view/renderer/abstract_renderer.rb:39:in `block in instrument'\r\n  activesupport (4.2.0) lib/active_support/notifications.rb:164:in `block in instrument'\r\n  activesupport (4.2.0) lib/active_support/notifications/instrumenter.rb:20:in `instrument'\r\n  activesupport (4.2.0) lib/active_support/notifications.rb:164:in `instrument'\r\n  actionview (4.2.0) lib/action_view/renderer/abstract_renderer.rb:39:in `instrument'\r\n  actionview (4.2.0) lib/action_view/renderer/template_renderer.rb:53:in `block in render_template'\r\n  actionview (4.2.0) lib/action_view/renderer/template_renderer.rb:61:in `render_with_layout'\r\n  actionview (4.2.0) lib/action_view/renderer/template_renderer.rb:52:in `render_template'\r\n  actionview (4.2.0) lib/action_view/renderer/template_renderer.rb:14:in `render'\r\n  actionview (4.2.0) lib/action_view/renderer/renderer.rb:42:in `render_template'\r\n  actionview (4.2.0) lib/action_view/renderer/renderer.rb:23:in `render'\r\n  actionview (4.2.0) lib/action_view/rendering.rb:100:in `_render_template'\r\n  actionpack (4.2.0) lib/action_controller/metal/streaming.rb:217:in `_render_template'\r\n  actionview (4.2.0) lib/action_view/rendering.rb:83:in `render_to_body'\r\n  actionpack (4.2.0) lib/action_controller/metal/rendering.rb:32:in `render_to_body'\r\n  actionpack (4.2.0) lib/action_controller/metal/renderers.rb:37:in `render_to_body'\r\n  actionpack (4.2.0) lib/abstract_controller/rendering.rb:25:in `render'\r\n  actionpack (4.2.0) lib/action_controller/metal/rendering.rb:16:in `render'\r\n  actionpack (4.2.0) lib/action_controller/metal/instrumentation.rb:41:in `block (2 levels) in render'\r\n  activesupport (4.2.0) lib/active_support/core_ext/benchmark.rb:12:in `block in ms'\r\n   () Users/neo/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/benchmark.rb:303:in `realtime'\r\n  activesupport (4.2.0) lib/active_support/core_ext/benchmark.rb:12:in `ms'\r\n  actionpack (4.2.0) lib/action_controller/metal/instrumentation.rb:41:in `block in render'\r\n  actionpack (4.2.0) lib/action_controller/metal/instrumentation.rb:84:in `cleanup_view_runtime'\r\n  activerecord (4.2.0) lib/active_record/railties/controller_runtime.rb:25:in `cleanup_view_runtime'\r\n  actionpack (4.2.0) lib/action_controller/metal/instrumentation.rb:40:in `render'\r\n  remotipart (1.2.1) lib/remotipart/render_overrides.rb:14:in `render_with_remotipart'\r\n  actionpack (4.2.0) lib/action_controller/metal/implicit_render.rb:10:in `default_render'\r\n  responders (2.0.2) lib/action_controller/responder.rb:236:in `default_render'\r\n  responders (2.0.2) lib/action_controller/responder.rb:170:in `to_html'\r\n  responders (2.0.2) lib/responders/flash_responder.rb:107:in `to_html'\r\n  responders (2.0.2) lib/action_controller/responder.rb:163:in `respond'\r\n  responders (2.0.2) lib/action_controller/responder.rb:156:in `call'\r\n  responders (2.0.2) lib/action_controller/respond_with.rb:203:in `respond_with'\r\n   () Users/neo/.rvm/gems/ruby-2.2.2@airdrilling/bundler/gems/inherited_resources-54eb09943793/lib/inherited_resources/actions.rb:7:in `index'\r\n   () Users/neo/.rvm/gems/ruby-2.2.2@airdrilling/bundler/gems/active_admin-7aef260921d4/lib/active_admin/resource_controller/streaming.rb:12:in `index'\r\n  actionpack (4.2.0) lib/action_controller/metal/implicit_render.rb:4:in `send_action'\r\n  actionpack (4.2.0) lib/abstract_controller/base.rb:198:in `process_action'\r\n  actionpack (4.2.0) lib/action_controller/metal/rendering.rb:10:in `process_action'\r\n  actionpack (4.2.0) lib/abstract_controller/callbacks.rb:20:in `block in process_action'\r\n  activesupport (4.2.0) lib/active_support/callbacks.rb:117:in `call'\r\n  activesupport (4.2.0) lib/active_support/callbacks.rb:151:in `block in halting_and_conditional'\r\n  activesupport (4.2.0) lib/active_support/callbacks.rb:169:in `block in halting'\r\n  activesupport (4.2.0) lib/active_support/callbacks.rb:169:in `block in halting'\r\n  activesupport (4.2.0) lib/active_support/callbacks.rb:169:in `block in halting'\r\n  activesupport (4.2.0) lib/active_support/callbacks.rb:169:in `block in halting'\r\n  activesupport (4.2.0) lib/active_support/callbacks.rb:234:in `block in halting'\r\n  activesupport (4.2.0) lib/active_support/callbacks.rb:169:in `block in halting'\r\n  activesupport (4.2.0) lib/active_support/callbacks.rb:92:in `_run_callbacks'\r\n  activesupport (4.2.0) lib/active_support/callbacks.rb:734:in `_run_process_action_callbacks'\r\n  activesupport (4.2.0) lib/active_support/callbacks.rb:81:in `run_callbacks'\r\n  actionpack (4.2.0) lib/abstract_controller/callbacks.rb:19:in `process_action'\r\n  actionpack (4.2.0) lib/action_controller/metal/rescue.rb:29:in `process_action'\r\n  actionpack (4.2.0) lib/action_controller/metal/instrumentation.rb:31:in `block in process_action'\r\n  activesupport (4.2.0) lib/active_support/notifications.rb:164:in `block in instrument'\r\n  activesupport (4.2.0) lib/active_support/notifications/instrumenter.rb:20:in `instrument'\r\n  activesupport (4.2.0) lib/active_support/notifications.rb:164:in `instrument'\r\n  actionpack (4.2.0) lib/action_controller/metal/instrumentation.rb:30:in `process_action'\r\n  actionpack (4.2.0) lib/action_controller/metal/params_wrapper.rb:250:in `process_action'\r\n  activerecord (4.2.0) lib/active_record/railties/controller_runtime.rb:18:in `process_action'\r\n  actionpack (4.2.0) lib/abstract_controller/base.rb:137:in `process'\r\n  actionview (4.2.0) lib/action_view/rendering.rb:30:in `process'\r\n  actionpack (4.2.0) lib/action_controller/metal.rb:195:in `dispatch'\r\n  actionpack (4.2.0) lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'\r\n  actionpack (4.2.0) lib/action_controller/metal.rb:236:in `block in action'\r\n  actionpack (4.2.0) lib/action_dispatch/routing/route_set.rb:73:in `dispatch'\r\n  actionpack (4.2.0) lib/action_dispatch/routing/route_set.rb:42:in `serve'\r\n  actionpack (4.2.0) lib/action_dispatch/journey/router.rb:43:in `block in serve'\r\n  actionpack (4.2.0) lib/action_dispatch/journey/router.rb:30:in `serve'\r\n  actionpack (4.2.0) lib/action_dispatch/routing/route_set.rb:802:in `call'\r\n  newrelic_rpm (3.9.9.275) lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'\r\n  omniauth (1.2.2) lib/omniauth/strategy.rb:186:in `call!'\r\n  omniauth (1.2.2) lib/omniauth/strategy.rb:164:in `call'\r\n  newrelic_rpm (3.9.9.275) lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'\r\n  newrelic_rpm (3.9.9.275) lib/new_relic/rack/agent_hooks.rb:30:in `traced_call'\r\n  newrelic_rpm (3.9.9.275) lib/new_relic/agent/instrumentation/middleware_tracing.rb:55:in `call'\r\n  newrelic_rpm (3.9.9.275) lib/new_relic/rack/browser_monitoring.rb:23:in `traced_call'\r\n  newrelic_rpm (3.9.9.275) lib/new_relic/agent/instrumentation/middleware_tracing.rb:55:in `call'\r\n  newrelic_rpm (3.9.9.275) lib/new_relic/rack/developer_mode.rb:56:in `traced_call'\r\n  newrelic_rpm (3.9.9.275) lib/new_relic/agent/instrumentation/middleware_tracing.rb:55:in `call'\r\n  warden (1.2.3) lib/warden/manager.rb:35:in `block in call'\r\n  warden (1.2.3) lib/warden/manager.rb:34:in `call'\r\n  newrelic_rpm (3.9.9.275) lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'\r\n  rack (1.6.4) lib/rack/etag.rb:24:in `call'\r\n  newrelic_rpm (3.9.9.275) lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'\r\n  rack (1.6.4) lib/rack/conditionalget.rb:25:in `call'\r\n  newrelic_rpm (3.9.9.275) lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'\r\n  rack (1.6.4) lib/rack/head.rb:13:in `call'\r\n  newrelic_rpm (3.9.9.275) lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'\r\n  remotipart (1.2.1) lib/remotipart/middleware.rb:27:in `call'\r\n  newrelic_rpm (3.9.9.275) lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'\r\n  actionpack (4.2.0) lib/action_dispatch/middleware/params_parser.rb:27:in `call'\r\n  newrelic_rpm (3.9.9.275) lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'\r\n  actionpack (4.2.0) lib/action_dispatch/middleware/flash.rb:260:in `call'\r\n  newrelic_rpm (3.9.9.275) lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'\r\n  rack (1.6.4) lib/rack/session/abstract/id.rb:225:in `context'\r\n  rack (1.6.4) lib/rack/session/abstract/id.rb:220:in `call'\r\n  newrelic_rpm (3.9.9.275) lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'\r\n  actionpack (4.2.0) lib/action_dispatch/middleware/cookies.rb:560:in `call'\r\n  newrelic_rpm (3.9.9.275) lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'\r\n  activerecord (4.2.0) lib/active_record/query_cache.rb:36:in `call'\r\n  newrelic_rpm (3.9.9.275) lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'\r\n  activerecord (4.2.0) lib/active_record/connection_adapters/abstract/connection_pool.rb:647:in `call'\r\n  newrelic_rpm (3.9.9.275) lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'\r\n  activerecord (4.2.0) lib/active_record/migration.rb:378:in `call'\r\n  newrelic_rpm (3.9.9.275) lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'\r\n  actionpack (4.2.0) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'\r\n  activesupport (4.2.0) lib/active_support/callbacks.rb:88:in `_run_callbacks'\r\n  activesupport (4.2.0) lib/active_support/callbacks.rb:734:in `_run_call_callbacks'\r\n  activesupport (4.2.0) lib/active_support/callbacks.rb:81:in `run_callbacks'\r\n  actionpack (4.2.0) lib/action_dispatch/middleware/callbacks.rb:27:in `call'\r\n  newrelic_rpm (3.9.9.275) lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'\r\n  actionpack (4.2.0) lib/action_dispatch/middleware/reloader.rb:73:in `call'\r\n  newrelic_rpm (3.9.9.275) lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'\r\n  actionpack (4.2.0) lib/action_dispatch/middleware/remote_ip.rb:78:in `call'\r\n  newrelic_rpm (3.9.9.275) lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'\r\n  airbrake (4.1.0) lib/airbrake/rails/middleware.rb:13:in `call'\r\n  newrelic_rpm (3.9.9.275) lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'\r\n  rollbar (1.3.1) lib/rollbar/middleware/rails/rollbar.rb:24:in `block in call'\r\n  rollbar (1.3.1) lib/rollbar.rb:747:in `scoped'\r\n  rollbar (1.3.1) lib/rollbar/middleware/rails/rollbar.rb:22:in `call'\r\n  newrelic_rpm (3.9.9.275) lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'\r\n  better_errors (2.1.1) lib/better_errors/middleware.rb:84:in `protected_app_call'\r\n  better_errors (2.1.1) lib/better_errors/middleware.rb:79:in `better_errors_call'\r\n  better_errors (2.1.1) lib/better_errors/middleware.rb:57:in `call'\r\n  newrelic_rpm (3.9.9.275) lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'\r\n  actionpack (4.2.0) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'\r\n  rollbar (1.3.1) lib/rollbar/middleware/rails/show_exceptions.rb:22:in `call_with_rollbar'\r\n  newrelic_rpm (3.9.9.275) lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'\r\n  actionpack (4.2.0) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'\r\n  newrelic_rpm (3.9.9.275) lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'\r\n  railties (4.2.0) lib/rails/rack/logger.rb:38:in `call_app'\r\n  railties (4.2.0) lib/rails/rack/logger.rb:20:in `block in call'\r\n  activesupport (4.2.0) lib/active_support/tagged_logging.rb:68:in `block in tagged'\r\n  activesupport (4.2.0) lib/active_support/tagged_logging.rb:26:in `tagged'\r\n  activesupport (4.2.0) lib/active_support/tagged_logging.rb:68:in `tagged'\r\n  railties (4.2.0) lib/rails/rack/logger.rb:20:in `call'\r\n  newrelic_rpm (3.9.9.275) lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'\r\n  actionpack (4.2.0) lib/action_dispatch/middleware/request_id.rb:21:in `call'\r\n  newrelic_rpm (3.9.9.275) lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'\r\n  rack (1.6.4) lib/rack/methodoverride.rb:22:in `call'\r\n  newrelic_rpm (3.9.9.275) lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'\r\n  rack (1.6.4) lib/rack/runtime.rb:18:in `call'\r\n  newrelic_rpm (3.9.9.275) lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'\r\n  rack (1.6.4) lib/rack/lock.rb:17:in `call'\r\n  newrelic_rpm (3.9.9.275) lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'\r\n  actionpack (4.2.0) lib/action_dispatch/middleware/static.rb:113:in `call'\r\n  newrelic_rpm (3.9.9.275) lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'\r\n  rack (1.6.4) lib/rack/sendfile.rb:113:in `call'\r\n  newrelic_rpm (3.9.9.275) lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'\r\n  airbrake (4.1.0) lib/airbrake/user_informer.rb:16:in `_call'\r\n  airbrake (4.1.0) lib/airbrake/user_informer.rb:12:in `call'\r\n  newrelic_rpm (3.9.9.275) lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'\r\n  railties (4.2.0) lib/rails/engine.rb:518:in `call'\r\n  railties (4.2.0) lib/rails/application.rb:164:in `call'\r\n  railties (4.2.0) lib/rails/railtie.rb:194:in `method_missing'\r\n  newrelic_rpm (3.9.9.275) lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'\r\n  rack (1.6.4) lib/rack/deflater.rb:35:in `call'\r\n  rack (1.6.4) lib/rack/content_length.rb:15:in `call'\r\n  thin (1.6.3) lib/thin/connection.rb:86:in `block in pre_process'\r\n  thin (1.6.3) lib/thin/connection.rb:84:in `pre_process'\r\n  thin (1.6.3) lib/thin/connection.rb:53:in `process'\r\n  thin (1.6.3) lib/thin/connection.rb:39:in `receive_data'\r\n  eventmachine (1.0.4) lib/eventmachine.rb:187:in `run'\r\n  thin (1.6.3) lib/thin/backends/base.rb:73:in `start'\r\n  thin (1.6.3) lib/thin/server.rb:162:in `start'\r\n  rack (1.6.4) lib/rack/handler/thin.rb:19:in `run'\r\n  rack (1.6.4) lib/rack/server.rb:286:in `start'\r\n  railties (4.2.0) lib/rails/commands/server.rb:80:in `start'\r\n  railties (4.2.0) lib/rails/commands/commands_tasks.rb:80:in `block in server'\r\n  railties (4.2.0) lib/rails/commands/commands_tasks.rb:75:in `server'\r\n  railties (4.2.0) lib/rails/commands/commands_tasks.rb:39:in `run_command!'\r\n  railties (4.2.0) lib/rails/commands.rb:17:in `<top (required)>'\r\n   () Users/neo/workspace/OpsManager/bin/rails:25:in `<top (required)>'\r\n  spring (1.2.0) lib/spring/client/rails.rb:27:in `call'\r\n  spring (1.2.0) lib/spring/client/command.rb:7:in `call'\r\n  spring (1.2.0) lib/spring/client.rb:26:in `run'\r\n  spring (1.2.0) bin/spring:48:in `<top (required)>'\r\n  spring (1.2.0) lib/spring/binstub.rb:11:in `<top (required)>'\r\n   () Users/neo/workspace/OpsManager/bin/spring:16:in `<top (required)>'\r\n   () rails:3:in `<main>'\r\n\r\n\r\n\r\nStarted POST \"/__better_errors/f4b027739c287fdc/variables\" for 127.0.0.1 at 2015-08-17 21:27:59 +0800\r\n  User Load (1.0ms)  SELECT \"users\".* FROM \"users\" WHERE \"users\".\"deleted_at\" IS NULL AND (\"users\".\"email\" >> '---\r\n- jas\r\n')  ORDER BY \"users\".\"id\" desc\r\nPG::UndefinedFunction: ERROR:  operator does not exist: character varying >> unknown\r\nLINE 1: ...RE \"users\".\"deleted_at\" IS NULL AND (\"users\".\"email\" >> '---\r\n                                                                ^\r\nHINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.\r\n: SELECT \"users\".* FROM \"users\" WHERE \"users\".\"deleted_at\" IS NULL AND (\"users\".\"email\" >> '---\r\n- jas\r\n')  ORDER BY \"users\".\"id\" desc\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/activeadmin/activeadmin/issues/comments/131844709","html_url":"https://github.com/activeadmin/activeadmin/issues/4078#issuecomment-131844709","issue_url":"https://api.github.com/repos/activeadmin/activeadmin/issues/4078","id":131844709,"user":{"login":"jasonm23","id":71587,"avatar_url":"https://avatars.githubusercontent.com/u/71587?v=3","gravatar_id":"","url":"https://api.github.com/users/jasonm23","html_url":"https://github.com/jasonm23","followers_url":"https://api.github.com/users/jasonm23/followers","following_url":"https://api.github.com/users/jasonm23/following{/other_user}","gists_url":"https://api.github.com/users/jasonm23/gists{/gist_id}","starred_url":"https://api.github.com/users/jasonm23/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasonm23/subscriptions","organizations_url":"https://api.github.com/users/jasonm23/orgs","repos_url":"https://api.github.com/users/jasonm23/repos","events_url":"https://api.github.com/users/jasonm23/events{/privacy}","received_events_url":"https://api.github.com/users/jasonm23/received_events","type":"User","site_admin":false},"created_at":"2015-08-17T14:40:23Z","updated_at":"2015-08-17T14:40:23Z","body":"Ok\r\n\r\n[1] pry(main)> User.ransack(email_contains: \"jas\").result\r\n\r\n  User Load (2.4ms)  SELECT \"users\".* FROM \"users\" WHERE \"users\".\"deleted_at\" IS NULL AND (\"users\".\"email\" >> '---\r\n- jas\r\n')\r\n\r\nPG::UndefinedFunction: ERROR:  operator does not exist: character varying >> unknown\r\nLINE 1: ...RE \"users\".\"deleted_at\" IS NULL AND (\"users\".\"email\" >> '---\r\n                                                                ^\r\nHINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.\r\n: SELECT \"users\".* FROM \"users\" WHERE \"users\".\"deleted_at\" IS NULL AND (\"users\".\"email\" >> '---\r\n- jas\r\n')\r\n\r\n=> #<User::ActiveRecord_Relation:0x3ffdd142a554>\r\n"}}