Cannot deform mesh with automatic weights during rigify process. Tried all solutions
Your model has lots of issues:

select the mesh in object mode
in the modifier stack remove the armature modifier;
R Z 90 (rotate the model by 90 degrees around the Z axes);
Ctrl A Apply rotation and scale;
Select the MetaRig and M move it to a different layer.
In edit mode A select all and remove doubles 0.1 mm (I removed something like 30.000 doubles).
Back to object mode select the mesh, select the rig Ctrl P, choose the "With empty groups" option and go with manual weighting: paint weight or assign weights via the properties panel, vertex section, vertex groups tab.

The automatic weighting is a simple shortcut for simple meshes: they must be manifold, joined, without holes and seams; your mesh is maden of multiple spare parts and is far more complicated than what is manageable by the automatic algorithm.