An ActiveRecord::StatementInvalid occurred in service_visits#index:
PG::SyntaxError: ERROR: syntax error at end of input
LINE 1: ...ypes"."id" = "service_visits"."service_visit_type_id" WHERE
^
app/datatables/service_visits_datatable.rb:16:in `as_json'
-------------------------------
Request:
-------------------------------
* URL : https://www.bikelink.org/service_visits.json?sEcho=4&iColumns=8&sColumns=%2C%2C%2C%2C%2C%2C%2C&iDisplayStart=0&iDisplayLength=50&mDataProp_0=0&sSearch_0=&bRegex_0=false&bSearchable_0=true&bSortable_0=true&mDataProp_1=1&sSearch_1=&bRegex_1=false&bSearchable_1=true&bSortable_1=true&mDataProp_2=2&sSearch_2=&bRegex_2=false&bSearchable_2=true&bSortable_2=true&mDataProp_3=3&sSearch_3=&bRegex_3=false&bSearchable_3=true&bSortable_3=true&mDataProp_4=4&sSearch_4=&bRegex_4=false&bSearchable_4=true&bSortable_4=true&mDataProp_5=5&sSearch_5=&bRegex_5=false&bSearchable_5=true&bSortable_5=true&mDataProp_6=6&sSearch_6=&bRegex_6=false&bSearchable_6=true&bSortable_6=true&mDataProp_7=7&sSearch_7=&bRegex_7=false&bSearchable_7=true&bSortable_7=false&sSearch=!D%20&bRegex=false&iSortCol_0=0&sSortDir_0=desc&iSortingCols=1&_=1734395749478
* HTTP Method: GET
* IP address : 73.140.171.168
* Parameters : {"sEcho"=>"4", "iColumns"=>"8", "sColumns"=>",,,,,,,", "iDisplayStart"=>"0", "iDisplayLength"=>"50", "mDataProp_0"=>"0", "sSearch_0"=>"", "bRegex_0"=>"false", "bSearchable_0"=>"true", "bSortable_0"=>"true", "mDataProp_1"=>"1", "sSearch_1"=>"", "bRegex_1"=>"false", "bSearchable_1"=>"true", "bSortable_1"=>"true", "mDataProp_2"=>"2", "sSearch_2"=>"", "bRegex_2"=>"false", "bSearchable_2"=>"true", "bSortable_2"=>"true", "mDataProp_3"=>"3", "sSearch_3"=>"", "bRegex_3"=>"false", "bSearchable_3"=>"true", "bSortable_3"=>"true", "mDataProp_4"=>"4", "sSearch_4"=>"", "bRegex_4"=>"false", "bSearchable_4"=>"true", "bSortable_4"=>"true", "mDataProp_5"=>"5", "sSearch_5"=>"", "bRegex_5"=>"false", "bSearchable_5"=>"true", "bSortable_5"=>"true", "mDataProp_6"=>"6", "sSearch_6"=>"", "bRegex_6"=>"false", "bSearchable_6"=>"true", "bSortable_6"=>"true", "mDataProp_7"=>"7", "sSearch_7"=>"", "bRegex_7"=>"false", "bSearchable_7"=>"true", "bSortable_7"=>"false", "sSearch"=>"!D ", "bRegex"=>"false", "iSortCol_0"=>"0", "sSortDir_0"=>"desc", "iSortingCols"=>"1", "_"=>"1734395749478", "controller"=>"service_visits", "action"=>"index", "format"=>"json"}
* Timestamp : 2024-12-17 00:35:58 UTC
* Server : www-9.internal.bikelink.org
* Rails root : /var/www/bikelink
* Process: 683424
-------------------------------
Session:
-------------------------------
* session id: [FILTERED]
* data: {"session_id"=>"220ecc869768ac25eb3a0241e24a219a",
"warden.user.person.key"=>[[50587], "TDpzqVbfWBoVKtA9zz5W"],
"params_for_filter"=>
{"filter_by_location"=>nil,
"filter_by_owner"=>nil,
"filter_by_state"=>2,
"filter_by_priority"=>nil},
"_csrf_token"=>"VfBu4ED051iW8614cRwBx0EJFTG9P6oMYs66mD7vOHY="}
-------------------------------
Environment:
-------------------------------
* GATEWAY_INTERFACE : CGI/1.2
* HTTP_ACCEPT : application/json, text/javascript, */*; q=0.01
* HTTP_ACCEPT_ENCODING : gzip, deflate, br, zstd
* HTTP_ACCEPT_LANGUAGE : en-US,en;q=0.9
* HTTP_CONNECTION : close
* HTTP_COOKIE : _ga=GA1.1.734180868.1722368250; __utmz=136922275.1722368276.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); _ga_5XJXN3VELE=deleted; _ga_5XJXN3VELE=deleted; __utmc=136922275; __utma=136922275.734180868.1722368250.1734386578.1734394792.342; __utmt=1; __utmb=136922275.22.10.1734394792; _ga_5XJXN3VELE=GS1.1.1734394791.300.1.1734395749.0.0.0; _bikelink_session=%2FnngT4DNDPTIcC7WJOx35Z9MPnE1x%2FzuoZpLAlWC7iiRYnBew3hcKDP4brBchbwVAw9%2FVDOktRNLiU8rkKvxxgiUkWqCR7I4ZaRC4mgRavScAGeNfjHEorIu9%2F65CawiW8seJWYZlbU3i27quCAFiQ%2BaMw2qi%2BNF81IPOfaZZo4OAJSZTeqFDnYulfdvne4IZjHHg7%2B9nhKkt0JmUGr5f3mMvXu%2BOuLhp21555kVE%2FITe0A2eOAJKvCshjyChGfpNC%2BWD8IN%2FaD2YmWU7yaFjfTKw0ruTGXqI79tL99SJL8Xepe%2FZgTE0B67BWxtY10iwHkGiEoVsTOb0FUtkexkjpY91WR%2Fo4byu6pN%2BODse1UyTQxwVhvO66qRUrYHbkgH%2FrZEl%2BPo4Kv9XjQMXmOju9%2BQxwV%2FDDjapP7op8yS2VMAuqFyr%2FdWxNUfV42B2O9IjMYfsEzrH6mFABO%2BPiRDEodUbXh0HSjGyyrM%2BI6ovzWseUeA6lTPMBvVQifJaP6lJ9ohuVc38oiCye7YL5nGdB43b5yWrRGqnMWyIss%2BeXlmUQpVLDkj6Ky0MJji31Zq5lKYEWZR2rdGrcOiSUTRpbs%3D--v1XTOCDY8SxQaGPJ--LXoj2anvCe4GTRz3Pdnhww%3D%3D
* HTTP_HOST : www.bikelink.org
* HTTP_PRIORITY : u=1, i
* HTTP_REFERER : https://www.bikelink.org/service_visits
* HTTP_SEC_CH_UA : "Google Chrome";v="131", "Chromium";v="131", "Not_A Brand";v="24"
* HTTP_SEC_CH_UA_MOBILE : ?0
* HTTP_SEC_CH_UA_PLATFORM : "Windows"
* HTTP_SEC_FETCH_DEST : empty
* HTTP_SEC_FETCH_MODE : cors
* HTTP_SEC_FETCH_SITE : same-origin
* HTTP_USER_AGENT : Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
* HTTP_VERSION : HTTP/1.0
* HTTP_X_AMZN_TRACE_ID : Root=1-6760c76e-05287b8e1a3e3f937876e218
* HTTP_X_CSRF_TOKEN : [FILTERED]
* HTTP_X_FORWARDED_FOR : 73.140.171.168, 73.140.171.168
* HTTP_X_FORWARDED_PORT : 443
* HTTP_X_FORWARDED_PROTO : https
* HTTP_X_REQUESTED_WITH : XMLHttpRequest
* ORIGINAL_FULLPATH : /service_visits.json?sEcho=4&iColumns=8&sColumns=%2C%2C%2C%2C%2C%2C%2C&iDisplayStart=0&iDisplayLength=50&mDataProp_0=0&sSearch_0=&bRegex_0=false&bSearchable_0=true&bSortable_0=true&mDataProp_1=1&sSearch_1=&bRegex_1=false&bSearchable_1=true&bSortable_1=true&mDataProp_2=2&sSearch_2=&bRegex_2=false&bSearchable_2=true&bSortable_2=true&mDataProp_3=3&sSearch_3=&bRegex_3=false&bSearchable_3=true&bSortable_3=true&mDataProp_4=4&sSearch_4=&bRegex_4=false&bSearchable_4=true&bSortable_4=true&mDataProp_5=5&sSearch_5=&bRegex_5=false&bSearchable_5=true&bSortable_5=true&mDataProp_6=6&sSearch_6=&bRegex_6=false&bSearchable_6=true&bSortable_6=true&mDataProp_7=7&sSearch_7=&bRegex_7=false&bSearchable_7=true&bSortable_7=false&sSearch=!D%20&bRegex=false&iSortCol_0=0&sSortDir_0=desc&iSortingCols=1&_=1734395749478
* ORIGINAL_SCRIPT_NAME :
* PATH_INFO : /service_visits.json
* QUERY_STRING : sEcho=4&iColumns=8&sColumns=%2C%2C%2C%2C%2C%2C%2C&iDisplayStart=0&iDisplayLength=50&mDataProp_0=0&sSearch_0=&bRegex_0=false&bSearchable_0=true&bSortable_0=true&mDataProp_1=1&sSearch_1=&bRegex_1=false&bSearchable_1=true&bSortable_1=true&mDataProp_2=2&sSearch_2=&bRegex_2=false&bSearchable_2=true&bSortable_2=true&mDataProp_3=3&sSearch_3=&bRegex_3=false&bSearchable_3=true&bSortable_3=true&mDataProp_4=4&sSearch_4=&bRegex_4=false&bSearchable_4=true&bSortable_4=true&mDataProp_5=5&sSearch_5=&bRegex_5=false&bSearchable_5=true&bSortable_5=true&mDataProp_6=6&sSearch_6=&bRegex_6=false&bSearchable_6=true&bSortable_6=true&mDataProp_7=7&sSearch_7=&bRegex_7=false&bSearchable_7=true&bSortable_7=false&sSearch=!D%20&bRegex=false&iSortCol_0=0&sSortDir_0=desc&iSortingCols=1&_=1734395749478
* REMOTE_ADDR : 127.0.0.1
* REQUEST_METHOD : GET
* REQUEST_PATH : /service_visits.json
* REQUEST_URI : /service_visits.json?sEcho=4&iColumns=8&sColumns=%2C%2C%2C%2C%2C%2C%2C&iDisplayStart=0&iDisplayLength=50&mDataProp_0=0&sSearch_0=&bRegex_0=false&bSearchable_0=true&bSortable_0=true&mDataProp_1=1&sSearch_1=&bRegex_1=false&bSearchable_1=true&bSortable_1=true&mDataProp_2=2&sSearch_2=&bRegex_2=false&bSearchable_2=true&bSortable_2=true&mDataProp_3=3&sSearch_3=&bRegex_3=false&bSearchable_3=true&bSortable_3=true&mDataProp_4=4&sSearch_4=&bRegex_4=false&bSearchable_4=true&bSortable_4=true&mDataProp_5=5&sSearch_5=&bRegex_5=false&bSearchable_5=true&bSortable_5=true&mDataProp_6=6&sSearch_6=&bRegex_6=false&bSearchable_6=true&bSortable_6=true&mDataProp_7=7&sSearch_7=&bRegex_7=false&bSearchable_7=true&bSortable_7=false&sSearch=!D%20&bRegex=false&iSortCol_0=0&sSortDir_0=desc&iSortingCols=1&_=1734395749478
* ROUTES_13660_SCRIPT_NAME :
* SCRIPT_NAME :
* SERVER_NAME : www.bikelink.org
* SERVER_PORT : 443
* SERVER_PROTOCOL : HTTP/1.0
* SERVER_SOFTWARE : puma 6.4.0 The Eagle of Durango
* action_controller.instance : #<ServiceVisitsController:0x00007474b5701f68>
* action_dispatch.authenticated_encrypted_cookie_salt : [FILTERED]
* action_dispatch.backtrace_cleaner : #<Rails::BacktraceCleaner:0x0000622688cca068>
* action_dispatch.content_security_policy :
* action_dispatch.content_security_policy_nonce_directives:
* action_dispatch.content_security_policy_nonce_generator :
* action_dispatch.content_security_policy_report_only : false
* action_dispatch.cookies : #<ActionDispatch::Cookies::CookieJar:0x00007474b5b3cb00>
* action_dispatch.cookies_digest :
* action_dispatch.cookies_rotations : #<ActiveSupport::Messages::RotationConfiguration:0x00006226866d80f8>
* action_dispatch.cookies_same_site_protection : #<Proc:0x000062268e219a28 /var/www/bikelink/vendor/bundle/ruby/3.0.0/gems/railties-6.1.7.6/lib/rails/application.rb:636>
* action_dispatch.cookies_serializer : json
* action_dispatch.encrypted_cookie_cipher : [FILTERED]
* action_dispatch.encrypted_cookie_salt : [FILTERED]
* action_dispatch.encrypted_signed_cookie_salt : [FILTERED]
* action_dispatch.http_auth_salt : [FILTERED]
* action_dispatch.key_generator : #<ActiveSupport::CachingKeyGenerator:0x000062268e413838>
* action_dispatch.logger : #<ActiveSupport::Logger:0x00006226875cd270>
* action_dispatch.parameter_filter : [:confirm_password, :credit_card_number, :password, :passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn]
* action_dispatch.permissions_policy :
* action_dispatch.redirect_filter : []
* action_dispatch.remote_ip : 73.140.171.168
* action_dispatch.request.content_type :
* action_dispatch.request.formats : [#<Mime::Type:0x000062268678b068 @synonyms=["text/x-json", "application/jsonrequest"], @symbol=:json, @string="application/json", @hash=-2583812667748711987>]
* action_dispatch.request.parameters : {"sEcho"=>"4", "iColumns"=>"8", "sColumns"=>",,,,,,,", "iDisplayStart"=>"0", "iDisplayLength"=>"50", "mDataProp_0"=>"0", "sSearch_0"=>"", "bRegex_0"=>"false", "bSearchable_0"=>"true", "bSortable_0"=>"true", "mDataProp_1"=>"1", "sSearch_1"=>"", "bRegex_1"=>"false", "bSearchable_1"=>"true", "bSortable...
* action_dispatch.request.path_parameters : {:controller=>"service_visits", :action=>"index", :format=>"json"}
* action_dispatch.request.query_parameters : {"sEcho"=>"4", "iColumns"=>"8", "sColumns"=>",,,,,,,", "iDisplayStart"=>"0", "iDisplayLength"=>"50", "mDataProp_0"=>"0", "sSearch_0"=>"", "bRegex_0"=>"false", "bSearchable_0"=>"true", "bSortable_0"=>"true", "mDataProp_1"=>"1", "sSearch_1"=>"", "bRegex_1"=>"false", "bSearchable_1"=>"true", "bSortable...
* action_dispatch.request.request_parameters : {}
* action_dispatch.request.unsigned_session_cookie : {"session_id"=>"220ecc869768ac25eb3a0241e24a219a", "warden.user.person.key"=>[[50587], "TDpzqVbfWBoVKtA9zz5W"], "params_for_filter"=>{"filter_by_location"=>nil, "filter_by_owner"=>nil, "filter_by_state"=>2, "filter_by_priority"=>nil}, "_csrf_token"=>"[FILTERED]"}
* action_dispatch.request_id : 41c89b0a-0a15-49d8-b9dd-2713d73a8134
* action_dispatch.routes : #<ActionDispatch::Routing::RouteSet:0x000062268ad3f668>
* action_dispatch.secret_key_base : [FILTERED]
* action_dispatch.show_detailed_exceptions : false
* action_dispatch.show_exceptions : true
* action_dispatch.signed_cookie_digest :
* action_dispatch.signed_cookie_salt : [FILTERED]
* action_dispatch.use_authenticated_cookie_encryption : [FILTERED]
* action_dispatch.use_cookies_with_metadata : true
* newrelic.transaction_started : true
* puma.config : #<Puma::Configuration:0x00006226857db7a8>
* puma.request_body_wait : 0.005069732666015625
* puma.socket : #<UNIXSocket:0x00007474b541b380>
* rack.after_reply : []
* rack.errors : #<IO:0x0000622684aa5818>
* rack.hijack : #<Puma::Client:0x00007474b541b358>
* rack.hijack? : true
* rack.input : #<Puma::NullIO:0x00006226857ca110>
* rack.multiprocess : true
* rack.multithread : true
* rack.request.cookie_hash : {"_ga"=>"GA1.1.734180868.1722368250", "__utmz"=>"136922275.1722368276.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)", "_ga_5XJXN3VELE"=>"deleted", "__utmc"=>"136922275", "__utma"=>"136922275.734180868.1722368250.1734386578.1734394792.342", "__utmt"=>"1", "__utmb"=>"136922275.22.10.1734394792", "...
* rack.request.cookie_string : _ga=GA1.1.734180868.1722368250; __utmz=136922275.1722368276.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); _ga_5XJXN3VELE=deleted; _ga_5XJXN3VELE=deleted; __utmc=136922275; __utma=136922275.734180868.1722368250.1734386578.1734394792.342; __utmt=1; __utmb=136922275.22.10.1734394792; _ga_5XJXN3VELE=GS1.1.1734394791.300.1.1734395749.0.0.0; _bikelink_session=%2FnngT4DNDPTIcC7WJOx35Z9MPnE1x%2FzuoZpLAlWC7iiRYnBew3hcKDP4brBchbwVAw9%2FVDOktRNLiU8rkKvxxgiUkWqCR7I4ZaRC4mgRavScAGeNfjHEorIu9%2F65CawiW8seJWYZlbU3i27quCAFiQ%2BaMw2qi%2BNF81IPOfaZZo4OAJSZTeqFDnYulfdvne4IZjHHg7%2B9nhKkt0JmUGr5f3mMvXu%2BOuLhp21555kVE%2FITe0A2eOAJKvCshjyChGfpNC%2BWD8IN%2FaD2YmWU7yaFjfTKw0ruTGXqI79tL99SJL8Xepe%2FZgTE0B67BWxtY10iwHkGiEoVsTOb0FUtkexkjpY91WR%2Fo4byu6pN%2BODse1UyTQxwVhvO66qRUrYHbkgH%2FrZEl%2BPo4Kv9XjQMXmOju9%2BQxwV%2FDDjapP7op8yS2VMAuqFyr%2FdWxNUfV42B2O9IjMYfsEzrH6mFABO%2BPiRDEodUbXh0HSjGyyrM%2BI6ovzWseUeA6lTPMBvVQifJaP6lJ9ohuVc38oiCye7YL5nGdB43b5yWrRGqnMWyIss%2BeXlmUQpVLDkj6Ky0MJji31Zq5lKYEWZR2rdGrcOiSUTRpbs%3D--v1XTOCDY8SxQaGPJ--LXoj2anvCe4GTRz3Pdnhww%3D%3D
* rack.request.query_hash : {"sEcho"=>"4", "iColumns"=>"8", "sColumns"=>",,,,,,,", "iDisplayStart"=>"0", "iDisplayLength"=>"50", "mDataProp_0"=>"0", "sSearch_0"=>"", "bRegex_0"=>"false", "bSearchable_0"=>"true", "bSortable_0"=>"true", "mDataProp_1"=>"1", "sSearch_1"=>"", "bRegex_1"=>"false", "bSearchable_1"=>"true", "bSortable...
* rack.request.query_string : sEcho=4&iColumns=8&sColumns=%2C%2C%2C%2C%2C%2C%2C&iDisplayStart=0&iDisplayLength=50&mDataProp_0=0&sSearch_0=&bRegex_0=false&bSearchable_0=true&bSortable_0=true&mDataProp_1=1&sSearch_1=&bRegex_1=false&bSearchable_1=true&bSortable_1=true&mDataProp_2=2&sSearch_2=&bRegex_2=false&bSearchable_2=true&bSortable_2=true&mDataProp_3=3&sSearch_3=&bRegex_3=false&bSearchable_3=true&bSortable_3=true&mDataProp_4=4&sSearch_4=&bRegex_4=false&bSearchable_4=true&bSortable_4=true&mDataProp_5=5&sSearch_5=&bRegex_5=false&bSearchable_5=true&bSortable_5=true&mDataProp_6=6&sSearch_6=&bRegex_6=false&bSearchable_6=true&bSortable_6=true&mDataProp_7=7&sSearch_7=&bRegex_7=false&bSearchable_7=true&bSortable_7=false&sSearch=!D%20&bRegex=false&iSortCol_0=0&sSortDir_0=desc&iSortingCols=1&_=1734395749478
* rack.run_once : false
* rack.session : #<ActionDispatch::Request::Session:0x00007474b543c3c8>
* rack.session.options : #<ActionDispatch::Request::Session::Options:0x00007474b543c378>
* rack.tempfiles : []
* rack.url_scheme : https
* rack.version : [1, 6]
* warden : Warden::Proxy:13361600 @config={:default_scope=>:person, :scope_defaults=>{}, :default_strategies=>{:person=>[:two_factor_authenticatable, :two_factor_authenticatable, :rememberable]}, :intercept_401=>false, :failure_app=>#<Devise::Delegator:0x000062268aca6a08>}
-------------------------------
Backtrace:
-------------------------------
app/datatables/service_visits_datatable.rb:16:in `as_json'
app/controllers/service_visits_controller.rb:57:in `block (2 levels) in index'
app/controllers/service_visits_controller.rb:47:in `index'
app/controllers/application_controller.rb:45:in `process_action'