Alfie May looked to have won the game for Doncaster in the final minute of normal time when he swept home John Marquis’ impressive cross.
But Ruffels curled in a superb effort from the edge of the box with the last kick of the game to see Oxford extend their impressive run to just one defeat in 16 matches.
They had to come from behind twice, first when Ben Whiteman slammed home a 20th minute penalty after Rob Dickie had been adjudged to have brought down Andy Butler.
Oxford continued to have the better of the play, particularly after the break, but it took them until the 64th minute to equalise when Gavin Whyte was played into space from a short free-kick and slammed under Ian Lawlor.
The game seemed destined to end as a draw and indeed it did but only after May and Ruffels played their parts in the late drama.