Fix error-logging with Rails >4.