ActiveRecord::StatementInvalid. PG Error

前端 未结 2 1847
無奈伤痛
無奈伤痛 2021-02-12 17:11

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:01

    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.

提交回复
热议问题