Rina Khan, aged 41, of Smethwick, was accused of hitting the child so hard the ruler broke as punishment for getting a question wrong during a maths lesson.
She went on trial for common assault and child cruelty.
But after less than an hour of deliberating yesterday a jury agreed with her version of events and cleared of her of all charges.
Prosecutors had said she flipped and lost her temper before lashing out with the stationary and also claimed she called the boy a 'muppet'.
But Khan wept in the dock as she told the court on Wednesday how she only 'tapped' the boy on the head because he was misbehaving by poking another pupil with a pencil.
Recorder John Edwards told Ms Khan, who looked visibly relieved as the not guilty charges were read out: "You have been found not guilty on both counts.
"You are discharged and you are free to go."
Outside court Ms Khan spoke of her relief following her ordeal which saw her suspended from her job and taking antidepressants.
She said: "I am just very relieved that the word was not guilty. This has been going in since March.
"I was suspended and I have been ill at home since. I have been taking antidepressants and I had become somewhat of a recluse.
"And all this just for tapping a child on the head with a ruler.
"I do feel like I have been picked on. I'm not sure what I'm going to do next."
The court heard how Ms Khan warned the child twice about poking the other pupil with a pencil at the school, which cannot be named for legal reasons.
She admitted then striking him on the head with the ruler but said she only did so gently and the ruler may have broke because it was weak.
Jurors were also told the boy 'barely reacted at all' and was not injured during the incident.
Mr Tom Walkling, defending, added: "Do we want to live in a world where teachers are so afraid of being prosecuted in a criminal court that they are wary of any contact with the children in their care?
"Is tapping a naughty boy on the head with a ruler really a criminal assault?"