The term comes from the French word ruban which actually means ribbon, so somewhere in history this word was corrupted and idiomized.
In the 17th or 18th century, when peasants in France wanted to complain to the king using a petition, the usual reaction from the monarch was to seize the two-three people on top of that petition list and execute them, so naturally nobody wanted to have his name on top of it.
As a solution to this, names were signed in a circle at the bottom of the petition (like a ribbon), so that no one would be on top of the list and thus all participants took equal blame for the petition.
The principle was later also used by sailors in the British Royal Navy.Origin