I am trying to find a project from Project
model using Project.find(id)
but it is giving me ActiveRecord::StatementInvalid
error
F
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.