time-exchange-gr/oscurrency — Issue #15: StatementInvalid exception
Author: 3point2
Created: 2011-11-07 14:40:42+00:00
State: open

A ActiveRecord::StatementInvalid occurred in searches#index:

PGError: ERROR: invalid input syntax for integer: ""
: SELECT communications.*, ts_rank_cd((to_tsvector('english', coalesce("communications"."subject", '') || ' ' || coalesce("communications"."content", '') || ' ' || coalesce("communications"."recipient_id", ''))),
to_tsquery('''Î²Î±ÏƒÎ¹Î»Î·Ïƒ'' & ''ÏÎµÎ²ÎµÎ»Î±Ï‚''')) as rank FROM "communications" WHERE (to_tsvector('english', coalesce("communications"."subject", '') || ' ' || coalesce("communications"."content", '') || ' ' || coalesce("communications"."recipient_id", '')) @@ to_tsquery('''Î²Î±ÏƒÎ¹Î»Î·Ïƒ'' & ''ÏÎµÎ²ÎµÎ»Î±Ï‚''')) AND ( ("communications"."type" = 'Message' ) ) ORDER BY rank DESC LIMIT 10 OFFSET 0
[RAILS_ROOT]/.bundle/gems/ruby/1.8/gems/activerecord-2.3.14/lib/active_record/connection_adapters/abstract_adapter.rb:227:in `log'

-------------------------------
Request:
-------------------------------

* URL : http://www.time-exchange.gr/searches?q=%CE%B2%CE%B1%CF%83%CE%B9%CE%BB%CE%B7%CF%83+%CF%81%CE%B5%CE%B2%CE%B5%CE%BB%CE%B1%CF%82&model=Message
* IP address: 91.140.44.173
* Parameters: {"model"=>"Message", "action"=>"index", "q"=>"Î²Î±ÏƒÎ¹Î»Î·Ïƒ ÏÎµÎ²ÎµÎ»Î±Ï‚", "controller"=>"searches"}
* Rails root: /app

-------------------------------
Session:
-------------------------------

* session id: nil
* data: nil

-------------------------------
Environment:
-------------------------------

* GATEWAY_INTERFACE : CGI/1.2
* HTTP_ACCEPT : text/html, application/xhtml+xml, */*
* HTTP_ACCEPT_ENCODING : gzip, deflate
* HTTP_ACCEPT_LANGUAGE : el
* HTTP_CONNECTION : close
* HTTP_COOKIE : _oscurrency_session=BAh7CiIacGVyc29uX2NyZWRlbnRpYWxzX2lkaTU6EF9jc3JmX3Rva2VuIjFGMmlpVkxORXA5UmhTUjVsTGFmWjU0Nmc0TEdIZDZJUDBMd0M1Ung5cWhVPToPc2Vzc2lvbl9pZCIlZDhhZDA5MTEzMTc4OTMxOTVkN2ViNTNiNGQ3MGU4NjgiF3BlcnNvbl9jcmVkZW50aWFscyIBgDc1OWE3MWM0NDQzZDA3NWJkNWJmNWQ2MWQ0Y2FmZmZmZmQzZDdlODVjOWExYjEyZDY2MTRkMDE5NTIxMmNkNmM1YjJjN2M4OGMxYWYwMTM1N2M4MzA5NTBhNGNhYTI0YzFmZDljYjk3ZTJlZTJhNDc1YzA0MmFhODhlMTc2N2E1IgpmbGFzaElDOidBY3Rpb25Db250cm9sbGVyOjpGbGFzaDo6Rmxhc2hIYXNoewAGOgpAdXNlZHsA--45068a748a558efd1141f532310407b2fa226c95; person_credentials=759a71c4443d075bd5bf5d61d4cafffffd3d7e85c9a1b12d6614d0195212cd6c5b2c7c88c1af01357c830950a4caa24c1fd9cb97e2ee2a475c042aa88e1767a5%3A%3A48
* HTTP_HOST : www.time-exchange.gr
* HTTP_REFERER : http://www.time-exchange.gr/messages
* HTTP_USER_AGENT : Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.0; Trident/5.0)
* HTTP_VERSION : HTTP/1.1
* HTTP_X_FORWARDED_FOR : 91.140.44.173
* HTTP_X_HEROKU_DYNOS_IN_USE : 1
* HTTP_X_HEROKU_QUEUE_DEPTH : 0
* HTTP_X_HEROKU_QUEUE_WAIT_TIME : 2
* HTTP_X_REAL_IP : 91.140.44.173
* HTTP_X_REQUEST_START : 1320197927495
* HTTP_X_VARNISH : 1791371163
* PATH_INFO : /searches
* QUERY_STRING : q=%CE%B2%CE%B1%CF%83%CE%B9%CE%BB%CE%B7%CF%83+%CF%81%CE%B5%CE%B2%CE%B5%CE%BB%CE%B1%CF%82&model=Message
* REMOTE_ADDR : 10.64.147.7
* REQUEST_METHOD : GET
* REQUEST_PATH : /searches
* REQUEST_URI : /searches?q=%CE%B2%CE%B1%CF%83%CE%B9%CE%BB%CE%B7%CF%83+%CF%81%CE%B5%CE%B2%CE%B5%CE%BB%CE%B1%CF%82&model=Message
* SCRIPT_NAME :
* SERVER_NAME : www.time-exchange.gr
* SERVER_PORT : 80
* SERVER_PROTOCOL : HTTP/1.1
* SERVER_SOFTWARE : thin 1.2.6 codename Crazy Delicious
* action_controller.request.path_parameters : actionindexcontrollersearches
* action_controller.request.query_parameters : modelMessageqÎ²Î±ÏƒÎ¹Î»Î·Ïƒ ÏÎµÎ²ÎµÎ»Î±Ï‚
* action_controller.request.request_parameters :
* action_controller.rescue.request : #
* action_controller.rescue.response : #
* action_dispatch.request.unsigned_session_cookie: _csrf_tokenF2iiVLNEp9RhSR5lLafZ546g4LGHd6IP0LwC5Rx9qhU=person_credentials_id48session_idd8ad0911317893195d7eb53b4d70e868flashperson_credentials759a71c4443d075bd5bf5d61d4cafffffd3d7e85c9a1b12d6614d0195212cd6c5b2c7c88c1af01357c830950a4caa24c1fd9cb97e2ee2a475c042aa88e1767a5
* async.callback : #
* async.close : #
* rack.errors : #
* rack.input : #
* rack.multiprocess : false
* rack.multithread : false
* rack.request.cookie_hash : _oscurrency_sessionBAh7CiIacGVyc29uX2NyZWRlbnRpYWxzX2lkaTU6EF9jc3JmX3Rva2VuIjFGMmlpVkxORXA5UmhTUjVsTGFmWjU0Nmc0TEdIZDZJUDBMd0M1Ung5cWhVPToPc2Vzc2lvbl9pZCIlZDhhZDA5MTEzMTc4OTMxOTVkN2ViNTNiNGQ3MGU4NjgiF3BlcnNvbl9jcmVkZW50aWFscyIBgDc1OWE3MWM0NDQzZDA3NWJkNWJmNWQ2MWQ0Y2FmZmZmZmQzZDdlODVjOWExYjEyZDY2MTRkMDE5NTIxMmNkNmM1YjJjN2M4OGMxYWYwMTM1N2M4MzA5NTBhNGNhYTI0YzFmZDljYjk3ZTJlZTJhNDc1YzA0MmFhODhlMTc2N2E1IgpmbGFzaElDOidBY3Rpb25Db250cm9sbGVyOjpGbGFzaDo6Rmxhc2hIYXNoewAGOgpAdXNlZHsA--45068a748a558efd1141f532310407b2fa226c95person_credentials759a71c4443d075bd5bf5d61d4cafffffd3d7e85c9a1b12d6614d0195212cd6c5b2c7c88c1af01357c830950a4caa24c1fd9cb97e2ee2a475c042aa88e1767a5::48
* rack.request.cookie_string : _oscurrency_session=BAh7CiIacGVyc29uX2NyZWRlbnRpYWxzX2lkaTU6EF9jc3JmX3Rva2VuIjFGMmlpVkxORXA5UmhTUjVsTGFmWjU0Nmc0TEdIZDZJUDBMd0M1Ung5cWhVPToPc2Vzc2lvbl9pZCIlZDhhZDA5MTEzMTc4OTMxOTVkN2ViNTNiNGQ3MGU4NjgiF3BlcnNvbl9jcmVkZW50aWFscyIBgDc1OWE3MWM0NDQzZDA3NWJkNWJmNWQ2MWQ0Y2FmZmZmZmQzZDdlODVjOWExYjEyZDY2MTRkMDE5NTIxMmNkNmM1YjJjN2M4OGMxYWYwMTM1N2M4MzA5NTBhNGNhYTI0YzFmZDljYjk3ZTJlZTJhNDc1YzA0MmFhODhlMTc2N2E1IgpmbGFzaElDOidBY3Rpb25Db250cm9sbGVyOjpGbGFzaDo6Rmxhc2hIYXNoewAGOgpAdXNlZHsA--45068a748a558efd1141f532310407b2fa226c95; person_credentials=759a71c4443d075bd5bf5d61d4cafffffd3d7e85c9a1b12d6614d0195212cd6c5b2c7c88c1af01357c830950a4caa24c1fd9cb97e2ee2a475c042aa88e1767a5%3A%3A48
* rack.request.query_hash : modelMessageqÎ²Î±ÏƒÎ¹Î»Î·Ïƒ ÏÎµÎ²ÎµÎ»Î±Ï‚
* rack.request.query_string : q=%CE%B2%CE%B1%CF%83%CE%B9%CE%BB%CE%B7%CF%83+%CF%81%CE%B5%CE%B2%CE%B5%CE%BB%CE%B1%CF%82&model=Message
* rack.run_once : false
* rack.session : person_credentials_id48_csrf_tokenF2iiVLNEp9RhSR5lLafZ546g4LGHd6IP0LwC5Rx9qhU=session_idd8ad0911317893195d7eb53b4d70e868person_credentials759a71c4443d075bd5bf5d61d4cafffffd3d7e85c9a1b12d6614d0195212cd6c5b2c7c88c1af01357c830950a4caa24c1fd9cb97e2ee2a475c042aa88e1767a5flash
* rack.session.options : domainhttponlytruepath/key_session_ididd8ad0911317893195d7eb53b4d70e868expire_after
* rack.url_scheme : http
* rack.version : 10

* Process: 1
* Server : 0b6af92b-a017-4733-ae21-3e0b9d781b56

-------------------------------
Backtrace:
-------------------------------
```
[RAILS_ROOT]/.bundle/gems/ruby/1.8/gems/activerecord-2.3.14/lib/active_record/connection_adapters/abstract_adapter.rb:227:in `log'
[RAILS_ROOT]/.bundle/gems/ruby/1.8/gems/activerecord-2.3.14/lib/active_record/connection_adapters/postgresql_adapter.rb:520:in `execute'
[RAILS_ROOT]/.bundle/gems/ruby/1.8/gems/activerecord-2.3.14/lib/active_record/connection_adapters/postgresql_adapter.rb:1002:in `select_raw'
[RAILS_ROOT]/.bundle/gems/ruby/1.8/gems/activerecord-2.3.14/lib/active_record/connection_adapters/postgresql_adapter.rb:989:in `select'
[RAILS_ROOT]/.bundle/gems/ruby/1.8/gems/activerecord-2.3.14/lib/active_record/connection_adapters/abstract/database_statements.rb:7:in `select_all_without_query_cache'
[RAILS_ROOT]/.bundle/gems/ruby/1.8/gems/activerecord-2.3.14/lib/active_record/connection_adapters/abstract/query_cache.rb:60:in `select_all'
[RAILS_ROOT]/.bundle/gems/ruby/1.8/gems/activerecord-2.3.14/lib/active_record/connection_adapters/abstract/query_cache.rb:81:in `cache_sql'
[RAILS_ROOT]/.bundle/gems/ruby/1.8/gems/activerecord-2.3.14/lib/active_record/connection_adapters/abstract/query_cache.rb:60:in `select_all'
[RAILS_ROOT]/.bundle/gems/ruby/1.8/gems/activerecord-2.3.14/lib/active_record/base.rb:665:in `find_by_sql'
[RAILS_ROOT]/.bundle/gems/ruby/1.8/gems/activerecord-2.3.14/lib/active_record/base.rb:1582:in `find_every'
[RAILS_ROOT]/.bundle/gems/ruby/1.8/gems/activerecord-2.3.14/lib/active_record/base.rb:619:in `find'
[RAILS_ROOT]/vendor/plugins/will_paginate/lib/will_paginate/finder.rb:85:in `send'
[RAILS_ROOT]/vendor/plugins/will_paginate/lib/will_paginate/finder.rb:85:in `paginate'
[RAILS_ROOT]/vendor/plugins/will_paginate/lib/will_paginate/collection.rb:89:in `create'
[RAILS_ROOT]/vendor/plugins/will_paginate/lib/will_paginate/finder.rb:79:in `paginate'
[RAILS_ROOT]/.bundle/gems/ruby/1.8/gems/activerecord-2.3.14/lib/active_record/named_scope.rb:186:in `send'
[RAILS_ROOT]/.bundle/gems/ruby/1.8/gems/activerecord-2.3.14/lib/active_record/named_scope.rb:186:in `method_missing'
[RAILS_ROOT]/.bundle/gems/ruby/1.8/gems/activerecord-2.3.14/lib/active_record/base.rb:2182:in `with_scope'
[RAILS_ROOT]/.bundle/gems/ruby/1.8/gems/activerecord-2.3.14/lib/active_record/named_scope.rb:118:in `__send__'
[RAILS_ROOT]/.bundle/gems/ruby/1.8/gems/activerecord-2.3.14/lib/active_record/named_scope.rb:118:in `with_scope'
[RAILS_ROOT]/.bundle/gems/ruby/1.8/gems/activerecord-2.3.14/lib/active_record/named_scope.rb:179:in `method_missing'
[RAILS_ROOT]/app/controllers/searches_controller.rb:24:in `index'
[RAILS_ROOT]/.bundle/gems/ruby/1.8/gems/actionpack-2.3.14/lib/action_controller/base.rb:1333:in `send'
[RAILS_ROOT]/.bundle/gems/ruby/1.8/gems/actionpack-2.3.14/lib/action_controller/base.rb:1333:in `perform_action_without_filters'
[RAILS_ROOT]/.bundle/gems/ruby/1.8/gems/actionpack-2.3.14/lib/action_controller/filters.rb:617:in `call_filters'
[RAILS_ROOT]/.bundle/gems/ruby/1.8/gems/actionpack-2.3.14/lib/action_controller/filters.rb:610:in `perform_action_without_benchmark'
[RAILS_ROOT]/.bundle/gems/ruby/1.8/gems/actionpack-2.3.14/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
[RAILS_ROOT]/.bundle/gems/ruby/1.8/gems/activesupport-2.3.14/lib/active_support/core_ext/benchmark.rb:17:in `ms'
/usr/ruby1.8.7/lib/ruby/1.8/benchmark.rb:308:in `realtime'
[RAILS_ROOT]/.bundle/gems/ruby/1.8/gems/activesupport-2.3.14/lib/active_support/core_ext/benchmark.rb:17:in `ms'
[RAILS_ROOT]/.bundle/gems/ruby/1.8/gems/actionpack-2.3.14/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
[RAILS_ROOT]/.bundle/gems/ruby/1.8/gems/actionpack-2.3.14/lib/action_controller/rescue.rb:160:in `perform_action_without_flash'
[RAILS_ROOT]/.bundle/gems/ruby/1.8/gems/actionpack-2.3.14/lib/action_controller/flash.rb:151:in `perform_action_without_render_component'
[RAILS_ROOT]/vendor/plugins/render_component/lib/components.rb:39:in `perform_action'
[RAILS_ROOT]/.bundle/gems/ruby/1.8/gems/actionpack-2.3.14/lib/action_controller/base.rb:532:in `send'
[RAILS_ROOT]/.bundle/gems/ruby/1.8/gems/actionpack-2.3.14/lib/action_controller/base.rb:532:in `process_without_filters'
[RAILS_ROOT]/.bundle/gems/ruby/1.8/gems/actionpack-2.3.14/lib/action_controller/filters.rb:606:in `process'
[RAILS_ROOT]/.bundle/gems/ruby/1.8/gems/actionpack-2.3.14/lib/action_controller/base.rb:391:in `process'
[RAILS_ROOT]/.bundle/gems/ruby/1.8/gems/actionpack-2.3.14/lib/action_controller/base.rb:386:in `call'
[RAILS_ROOT]/.bundle/gems/ruby/1.8/gems/actionpack-2.3.14/lib/action_controller/routing/route_set.rb:438:in `call'
[RAILS_ROOT]/.bundle/gems/ruby/1.8/gems/actionpack-2.3.14/lib/action_controller/dispatcher.rb:87:in `dispatch'
[RAILS_ROOT]/.bundle/gems/ruby/1.8/gems/actionpack-2.3.14/lib/action_controller/dispatcher.rb:121:in `_call'
[RAILS_ROOT]/.bundle/gems/ruby/1.8/gems/actionpack-2.3.14/lib/action_controller/dispatcher.rb:130:in `build_middleware_stack'
[RAILS_ROOT]/.bundle/gems/ruby/1.8/gems/activerecord-2.3.14/lib/active_record/query_cache.rb:29:in `call'
[RAILS_ROOT]/.bundle/gems/ruby/1.8/gems/activerecord-2.3.14/lib/active_record/query_cache.rb:29:in `call'
[RAILS_ROOT]/.bundle/gems/ruby/1.8/gems/activerecord-2.3.14/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache'
[RAILS_ROOT]/.bundle/gems/ruby/1.8/gems/activerecord-2.3.14/lib/active_record/query_cache.rb:9:in `cache'
[RAILS_ROOT]/.bundle/gems/ruby/1.8/gems/activerecord-2.3.14/lib/active_record/query_cache.rb:28:in `call'
[RAILS_ROOT]/.bundle/gems/ruby/1.8/gems/activerecord-2.3.14/lib/active_record/connection_adapters/abstract/connection_pool.rb:361:in `call'
[RAILS_ROOT]/.bundle/gems/ruby/1.8/gems/actionpack-2.3.14/lib/action_controller/string_coercion.rb:25:in `call'
[RAILS_ROOT]/.bundle/gems/ruby/1.8/gems/rack-1.1.2/lib/rack/head.rb:9:in `call'
[RAILS_ROOT]/.bundle/gems/ruby/1.8/gems/rack-1.1.2/lib/rack/methodoverride.rb:24:in `call'
[RAILS_ROOT]/.bundle/gems/ruby/1.8/gems/actionpack-2.3.14/lib/action_controller/params_parser.rb:15:in `call'
[RAILS_ROOT]/.bundle/gems/ruby/1.8/gems/actionpack-2.3.14/lib/action_controller/session/cookie_store.rb:99:in `call'
[RAILS_ROOT]/.bundle/gems/ruby/1.8/gems/activesupport-2.3.14/lib/active_support/cache/strategy/local_cache.rb:25:in `call'
[RAILS_ROOT]/.bundle/gems/ruby/1.8/gems/actionpack-2.3.14/lib/action_controller/failsafe.rb:26:in `call'
[RAILS_ROOT]/.bundle/gems/ruby/1.8/gems/rack-1.1.2/lib/rack/lock.rb:11:in `call'
[RAILS_ROOT]/.bundle/gems/ruby/1.8/gems/rack-1.1.2/lib/rack/lock.rb:11:in `synchronize'
[RAILS_ROOT]/.bundle/gems/ruby/1.8/gems/rack-1.1.2/lib/rack/lock.rb:11:in `call'
[RAILS_ROOT]/.bundle/gems/ruby/1.8/gems/actionpack-2.3.14/lib/action_controller/dispatcher.rb:106:in `call'
/usr/ruby1.8.7/lib/ruby/gems/1.8/gems/thin-1.2.6/lib/rack/adapter/rails.rb:74:in `call'
/home/heroku_rack/lib/static_assets.rb:9:in `call'
/home/heroku_rack/lib/last_access.rb:15:in `call'
[RAILS_ROOT]/.bundle/gems/ruby/1.8/gems/rack-1.1.2/lib/rack/urlmap.rb:47:in `call'
[RAILS_ROOT]/.bundle/gems/ruby/1.8/gems/rack-1.1.2/lib/rack/urlmap.rb:41:in `each'
[RAILS_ROOT]/.bundle/gems/ruby/1.8/gems/rack-1.1.2/lib/rack/urlmap.rb:41:in `call'
/home/heroku_rack/lib/date_header.rb:14:in `call'
[RAILS_ROOT]/.bundle/gems/ruby/1.8/gems/rack-1.1.2/lib/rack/builder.rb:77:in `call'
/usr/ruby1.8.7/lib/ruby/gems/1.8/gems/thin-1.2.6/lib/thin/connection.rb:76:in `pre_process'
/usr/ruby1.8.7/lib/ruby/gems/1.8/gems/thin-1.2.6/lib/thin/connection.rb:74:in `catch'
/usr/ruby1.8.7/lib/ruby/gems/1.8/gems/thin-1.2.6/lib/thin/connection.rb:74:in `pre_process'
/usr/ruby1.8.7/lib/ruby/gems/1.8/gems/thin-1.2.6/lib/thin/connection.rb:57:in `process'
/usr/ruby1.8.7/lib/ruby/gems/1.8/gems/thin-1.2.6/lib/thin/connection.rb:42:in `receive_data'
[RAILS_ROOT]/.bundle/gems/ruby/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run_machine'
[RAILS_ROOT]/.bundle/gems/ruby/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run'
/usr/ruby1.8.7/lib/ruby/gems/1.8/gems/thin-1.2.6/lib/thin/backends/base.rb:57:in `start'
/usr/ruby1.8.7/lib/ruby/gems/1.8/gems/thin-1.2.6/lib/thin/server.rb:156:in `start'
/usr/ruby1.8.7/lib/ruby/gems/1.8/gems/thin-1.2.6/lib/thin/controllers/controller.rb:80:in `start'
/usr/ruby1.8.7/lib/ruby/gems/1.8/gems/thin-1.2.6/lib/thin/runner.rb:177:in `send'
/usr/ruby1.8.7/lib/ruby/gems/1.8/gems/thin-1.2.6/lib/thin/runner.rb:177:in `run_command'
/usr/ruby1.8.7/lib/ruby/gems/1.8/gems/thin-1.2.6/lib/thin/runner.rb:143:in `run!'
/usr/ruby1.8.7/lib/ruby/gems/1.8/gems/thin-1.2.6/bin/thin:6
/usr/ruby1.8.7/bin/thin:19:in `load'
/usr/ruby1.8.7/bin/thin:19
```