vendredi 10 avril 2015

Rails activerecord - weird sql queries after upgrading ruby and passenger

We have a Rails 3.2.19 application. After upgrading Ruby 1.9.3 to 2.1.5 and Phusion Passenger 3.0.19 to 4.0.57, activerecord generated some incomplete SQL queries and tried to execute against MYSQL server. It was weird.



  1. ActiveRecord::StatementInvalid (Mysql2::Error: [34816] syntax error: improper query string termination: SELECT

  2. ActiveRecord::StatementInvalid (Mysql2::Error: [8192] Relation not found: no such relation ": SELECT `

  3. Mysql2::Error: [32768] Translate error: SQL-ERROR: unable to resolve relation "": SELECT agents.* FROM agents WHERE ``.id = 22241082 LIMIT 1

  4. ActiveRecord::StatementInvalid (Mysql2::Error: [32769] Unknown column: SQL-ERROR: unable to resolve column "agents.: SELECT agents.* FROM agents WHERE agents.`


All the above sql statements are invalid. We didn't do any application code change. Can anybody let me know, where things might have gone wrong? I couldn't find any information on internet like this.


Aucun commentaire:

Enregistrer un commentaire