Riding the rail was a punishment of Colonial America in which a man was made to straddle a fence rail held on the shoulders of two men, with other men on either side to keep him upright on the rail. The victim was then paraded around town or taken to the city limits and dumped by the roadside. Injuries from the ride could, if the victim were stripped, result in a cut crotch that often made walking painful.
The punishment was usually a form of mob extrajudicial punishment imposed in connection with tarring and feathering. It was intended to show community displeasure and humiliate the victim so he either conformed his behavior or left. Alternatively the term also referred to tying a person's hands and feet around a rail so the person dangles under the rail.