The 84th minute strike from the Dons forward was the difference in this afternoon’s friendly.
It was the visitors who had the first opportunity of the game as Frank Ross’ corner fell for Luc Bollan inside the box but the centre-back blasted the effort over the bar, before Calvin Ramsay drilled a shot wide of the post for the home side.
Jake Hastie broke down the right for Rangers on the 10th minute as he delivered a ball into the box which was cleared by Aberdeen but only as far as James Maxwell, who fired a low shot towards goal from the edge of the box but it was comfortably held by Tom Ritchie.
David Dangana lifted an effort just over the bar after a ball forward from Seb Ross before Kai Kennedy had a free-kick saved as both sides searched for a breakthrough.
Nathan Patterson found space down the right to deliver a dangerous cross into the box which met the run of Josh McPake but his shot hit the side netting.
Five minutes before the break, centre-half Rhys Breen won the ball back before feeding the ball forward to Jake Hastie who cut into the box hitting a low left-footed shot towards goal but it was held by Tom Ritchie.
The winger had another chance before half-time as his curling effort was deflected over the bar.
Early in the second-half Josh McPake won the ball back well and played a one-two with Kai Kennedy before it was picked up by captain Jack Thomson but his shot was wide.
Jack Thomson saw a curling right-footed shot go over the bar from the edge of the box, before James Maxwell saw his shot saved after good build up play between the left-back and Nathan Young-Coombes.
David Dangana’s shot was blocked by Brian Kinnear, while at the other end Jack Thomson picked out Kai Kennedy but his effort was saved by Ritchie.
Aberdeen had a good chance to open the scoring with 20 minutes remaining as a corner fell for Michael Ruth in space in the box but somehow the striker touched the ball wide of the post.
Another opportunity fell for Ruth shortly after as a long ball over the top saw him turn and hit a powerful shot but it drifted just over the bar.
Mark Gallagher came even closer for the hosts as his free-kick bounced off the crossbar.
The late pressure paid off for Aberdeen as they took the lead with six minutes remaining. Seb Ross crossed the ball into the box, with Michael Ruth getting a touch to turn it beyond Brian Kinnear.
Rangers had a chance to equalise late on but Josh McPake’s effort hit the side netting.
Aberdeen: Ritchie, Robertson, Booth, Ramsay, Bollan, Turner, Gallagher, S. Ross, D. Dangana, Ruth, F. Ross. Subs: Jackson, M. Dangana, Barron, Barry, Duncan, Paterson.
Rangers: Kinnear, Patterson (Butterworth, 74), Maxwell, McClelland, Breen (King, 46), Dickson (McKechnie, 82), Hastie, Thomson (Miller, 62), Young-Coombes, Kennedy, McPake. Subs: Hogarth, J. Balde, Devine.