A theoretical mechanism resulting in the prebiotic appearance of enantiopure ribose, which would be needed for the origin of RNA and the "RNA world" is proposed. The mechanism simultaneously explains the emergence of biological homochirality and could answer the question of why nucleic acids are based on ribose rather than another sugar. Cleavage of certain non-chiral mineral crystals is known to lead to formation of chiral surfaces. In a chromatography-like process a mixture of racemic carbohydrates originating from the formose reaction is proposed to have been separated on such a chiral surface. Monosaccharides interact with surfaces through their hydroxyl groups, either by hydrogen bond formation or complex formation with metal ions. alpha-Ribopyranose, which has all hydroxyl groups on one side of the ring, is known to interact more strongly than other sugars with surfaces, as corroborated by certain chromatographic and electrophoresis data. A similar scenario leading to enantiopure ribose is separation on a flat, but not necessarily chiral surface in the presence of a strong electric field capable of orienting highly polar derivatives of sugars.