The story
A German name, brought to England by Prince Rupert of the Rhine in the seventeenth century. Doublet of Robert. The geometry sense is also a reference to Prince Rupert, who posed the question of whether a cube could be passed through a hole made in another cube of the same size.
Etymology from Wiktionary, CC BY-SA 4.0.