ActiveRecord::StatementInvalid. PG Error

前端 未结 2 1160
执念已碎
执念已碎 2021-02-12 17:27

I am trying to find a project from Project model using Project.find(id) but it is giving me ActiveRecord::StatementInvalid error

F

2条回答
  •  感情败类
    2021-02-12 18:04

    It's a bug somewhere in your Ruby stack.

    It's trying to prepare a statement called "a1" which is examining table/view definitions (presumably for your "project" table). It finds out a prepared statement with the same name already exists and spits out an error. The query it is trying to prepare is fine - it returns a count of how many tables have a given name.

    Either it's not tracking its prepared statements properly or it thinks it's deleted one and hasn't really. I'd update rails & activerecord and check for bug reports.

提交回复
热议问题