ActiveRecord::StatementInvalid (PGError: ERROR: cached plan must not change result type
It turns out the issue was just like that of this person: http://stackoverflow.com/questions/2783813/postgres-8-3-error-cached-plan-must-not-change-result-type.
Basically, I ran a migration / modified my database table, but didn't restart the heroku app. So, after running
heroku run rake db:migrate
I had to also run
heroku restart
and the problem was solved.
Why do we have to do this? According to this site on Heroku, "After running a migration you’ll want to restart your app with heroku restart to reload the schema and pickup any schema changes."
Thanks! I just ran into this problem and this solved it for me.
ReplyDeletethanks. worked for me.
ReplyDeletethis saved me! thanks!
ReplyDeleteyep, your link was the top search result (query = this error's text) and fixed my problem, thanks for posting
ReplyDeletethanks just saved me from a heart attack!
ReplyDeleteThanks Man! :-) You saved my bacons!
ReplyDeletethanks dude worked
ReplyDeleteyou have no idea how happy this just made me. thank you!
ReplyDelete