One of the things I do when I receive a "ring x not closed" error for a polygon is to use the Polygons to Lines tool from the toolbar: Vector > Geometry Tools > Polygons to Lines...:
Now you can easily see where the error is visually. Fortunately, there's a simple solution...use the Lines to Polygons tool from the same menu!
Re-converting this should fill the ring as no errors were found using the Check geometry validity tool.
Hope this helps!
You can use the following code in the Python Console to do the above operation:
input = qgis.utils.iface.activeLayer() # Or change to path of shapefile (e.g. input = "C:/Test//example.shp")
result = "C:/Test//result.shp"
output_0 = processing.runalg("qgis:polygonstolines", input, None)
output_1 = processing.runalg("qgis:linestopolygons", output_0['OUTPUT'], result)