Their first three points of the campaign were secured thanks to Danny Ward’s cool finish after 32 minutes.
Stubbs was pleased to get the win after a draw with Wolves on the opening day and then back-to-back 3-0 away defeats to Aston Villa and Brighton.
He said: “The mood was good anyway, but it has lifted the mood for the fans and the club.
“We have had as difficult a start as anybody in terms of who we have played. I thought we got a really good result against a good football team.
“It’s important to win every week, but this league is one of the most difficult to do it in.
“We knew Brentford would cause us problems and you could see that in flashes. I’m delighted for the players.”
Stubbs also hailed his defence for getting their first clean sheet and added: “It’s not rocket science, if you keep clean sheets you have a good chance of winning games of football.
“I don’t feel like anyone has really cut us open for the goals. We haven’t helped ourselves.
“To think that you can play 90 minutes of attacking football is very difficult.
“There’s going to be periods where you have to be very organised and show a lot of commitment and character.”
Brentford head coach Dean Smith saw his side carve out a number of chances, but they could not get past Rotherham goalkeeper Lee Camp.
Smith bemoaned his side’s lack of a quality final ball and controlled finishing and said.
“I can’t be displeased with our performance. I thought we played well and the better team lost on the day, but that’s football sometimes.
“We opened them up a number of times in the first half with really good play. There was one where Scott’s (Hogan) touch let him down and one where Lasse (Vibe) put it wide. Camp also had to make a good save from Ledesma. They just had the more clear cut of the chances.”
With Alan Judge sidelined through injury, Smith is looking for wide players to add to his squad.
Rotherham United: Camp, Fisher, Ball, Kelvin Wilson, Kelly, Taylor, Vaulks, Adeyemi (Smallwood 46), Brown (Mattock 88), Allan (Forde 84), Ward. Unused substitutes: Wood, Forster-Caskey, Price, Yates.
Brentford: Bentley, Colin, Dean, Egan, Elder, Yennaris, Woods, Vibe (McEachran 84), Sawyers (Ledesma 76), Macleod (Saunders 58), Hogan. Unused substitutes: Bjelland, Kerschbaumer, Clarke, Kurasik.
Referee: James Adcock (Nottinghamshire).