The rub is a reference to the English game of bowls, where a rub is a flaw in the playing surface that interferes with the ball’s trajectory. The term is also used in modern golf, where the phrase the rub of the green may denote a flaw in the playing surface but usually refers more generally to bad luck in the game. In today’s idiomatic sense, a rub is a difficulty or impediment.
The longer idiomatic phrase there’s the rub was made famous by Shakespeare. In Hamlet, the title character delivers the oft-quoted “To be or not to be” soliloquy, which contains the line, “To sleep—perchance to dream: ay, there’s the rub!”
And there’s the rub. To produce any art you have to be prepared to expose yourself to judgment. [New Zealand Herald]
Therein lies the rub; while Tweeters were taking delight in serving Maver up medium-rare on a platter, he was hammering himself even worse. [The Province]
And that can be the rub: how to convey strangeness and difference without distance. [Guardian]
Light hitting the retina suppresses the production of melatonin—and there lies the rub. [New York Times]