pull a boner: make a foolish mistake
This expression is probably short for bonehead play. A bonehead is someone whose brain is lacking because his head is solid bone. The word bonehead has been around since the beginning of the twentieth century. Boner appeared shortly afterward. Early uses are always in the context of baseball, as in this 1913 judgment from American Magazine: "Got his signals mixed and pulled a boner."
The Dickson Baseball Dictionary describes an incident that many people believe popularized the expression. It took place on New York's Polo Grounds on September 23, 1908, in a game between the New York Giants and the Chicago Cubs. The teams were contending for first place in the National League. In the bottom of the ninth inning, the game was tied 1-1. New York had two outs, with men on first and third bases. When the Giants player at bat hit the ball into center field, the man on third base ran home, for what should have been the winning run.
Unfortunately, the man on first, a player named Fred Merkle, neglected to complete his run to second base. Apparently believing that the game was over when his teammate crossed home plate, he turned and headed for the clubhouse. As a result the Cubs were able to tag him out. Merkle's out invalidated his teammate's run, so the Giants did not win the game after all. New York fans seized on the recent slang term pull a boner as a satisfying way to express their wrath from the bleachers. Merkle never lived down his mistake. When he died in 1956, the AP obituary was titled "Fred Merkle, of 'Boner' Fame, Dies."
By 1920 pull a boner could mean a stupid mistake in any situation, not just baseball. The expression is still current with that meaning. Bonehead play is also still used in sports contexts.
Read more about this expression in Let's Talk Turkey: The Stories Behind America's Favorite Expressions (Prometheus, June 2008).