A late goal by league leaders Carlton Town denied Valley a deserved point on the road.
It looked like Tyrell Hamilton's debut goal midway through the first half was enough to secure a point but Lamin Manneh's 84th-minute strike made it six wins in a row for the hosts putting them ten points clear at the top for Christmas.
Rugby's starting line-up showed two changes from the previous weekend's - a rare Town win of late at home to Warwick, with Nathan Kabeya back after illness at full-back and new signing Hamilton in for the unavailable Trey Charles .
The visitors started brightly, and Rivel Mardenborough was soon testing Carlton keeper Felix Annan with a low, angled strike after Jack Concannon had fed the Valley striker.
A Hamilton shot shortly after looped up in the box, with Ewan Robson heading the ball away from danger off Mardenborough, before the hosts took the lead against the run of play when Manneh grabbed his first of the afternoon by guiding home into the bottom corner after Niall Hylton had played him in.
Oliver Clark blazed one well over as the Millers looked to extend their advantage, although Town skipper Sam Tye also then missed the target after a Concannon lay-back.
Rugby's deserved equaliser arrived after a neat cross from the left by Geoffrey Lundoloki was met by the head of Mardenborough and the ball bounced down for Hamilton to slide in and poke past Annan from close range.
Josh Thomas then did well to cut out Manneh's dangerous-looking centre from in front of his own goal, before Mardenborough's cross was similarly dealt with at the other end with Hamilton poised to pounce again - following good build-up play from Caine Elliott and Concannon.
Manneh's powerfully struck effort hit the side netting, and Hamilton's low effort was taken at the second attempt by Annan, as the two sides continued to trade chances ahead of the interval.
Carlton started the new period on top, with Hylton another to find the side netting after the visitors had broken quickly straight from the restart.
The home side's superiority continued for the majority of the half though, as Rugby struggled to regain any level of foothold on the game.
Clark's shot was well-blocked by Kabeya and Dean Freeman headed over Manneh's corner to the near post, with Lundoloki also blocking away an Ashley Chambers strike and Hylton sending a free-kick from the edge of the penalty area marginally over the bar.
In a rare attacking highlight from Valley, Hamilton showed some nice skill out wide before just failing to find his target with a cross, but Carlton were soon back on the offensive again, with Hylton's shot blocked after a quick counter-attack and Clark's effort was kept out by Town keeper Marcus Bald's body.
However, Bald was less assured when dropping a high ball, leading to an almighty scramble which saw both Freeman and sub Khyle Sargent denied in its aftermath - before Hylton subsequently blazed the loose ball over the bar from twenty yards.
Freeman's low shot fizzed wide, before another Bald clanger led to the winning goal with six minutes of normal time remaining, when this time his fumbled catching attempt was ultimately punished by Manneh after an initial strike from Chambers had been blocked in the goalmouth by Kabeya.