Active Record: statement preparation Errors

Hi There,

Rails 3.1, very basic webpage, the controller just does this:        def show                 @agenda_item = AgendaItem.find(params[:id])                 respond_to do |format|                         format.html # show.html.erb                         format.json { render :json => @session}                 end         end

but I do happen to get errors from active-record that seem to behave like a bug - I do see those errors sometimes, not always. It seems as if rails can't keep track of the statement preparations it has made...:

Completed 500 Internal Server Error in 4ms

ActiveRecord::StatementInvalid (PGError: ERROR: prepared statement "a8" already exists : SELECT "agenda_items".* FROM "agenda_items" WHERE "agenda_items"."id" = $1 LIMIT 1):   app/controllers/agenda_items_controller.rb:31:in `show'

Any help would really be appreciated. I don't mind disabling statement preparations, I just want that error not to happen, performance is not of my concern. Thanks a lot, wogri

Did you by any chance installed postgres on mac from te official dmg package? I used to have errors like this one, gone after I used postgres from homebrew

I think it's related to this bug:

  https://github.com/rails/rails/issues/1339

Which should be fixed in the next release.