I recently switched from MySQL to PostgreSQL.
It would appear that every time I save an ActiveRecord object rails
begins a database transaction before saving it, then commits after
inserting the data into the table. The problem with that is that I am
getting an this uninformative error:
ActiveRecord::StatementInvalid: PGError: ERROR: current transaction
is aborted, commands ignored until end of transaction block
: INSERT INTO pictures (....
Which tells me nothing about why the INSERT actually failed.
Apparently other people have ran into this as well:
I'd like to either disable transactions (at least for the sake of
functional tests) or still be able to retrieve my error somehow. Any
advice on either would be much appreciated.