The error raised in autorotate_image when the required jhead package is not installed (whilst redirected and handled by the popen3 code) causes the database connection to be closed, causing an error the next time the database is accessed:
ActiveRecord::StatementInvalid: PG::Error: no connection to the server
: ROLLBACK
The error raised in autorotate_image when the required jhead package is not installed (whilst redirected and handled by the popen3 code) causes the database connection to be closed, causing an error the next time the database is accessed:
ActiveRecord::StatementInvalid: PG::Error: no connection to the server : ROLLBACK
See also
https://github.com/brianmario/mysql2/issues/213#issuecomment-3594240