How was the first ruler (measuring stick) made? In order to measure the distance/length of each mark, another ruler would have been required. One choice would be to estimate.
For Imperial/English units, getting the king's foot or barley seeds length could be done with a string, then transferred over to wood later.. or, marked directly on wood to cut.
For Metric units, where meters are based off something we can't hold, maybe they used an imperial ruler?