Rua's lawyer, Dafydd Malcolm, said the quantity in each bag was the equivalent of one cannabis "tinny" (small amount of cannabis in tinfoil).
Malcolm said Rua lived a cash lifestyle and preferred to carry money on him because he shared his home with others.
He asked the judge to consider community work. However, Judge Hollister-Jones said the only sentence he would give was prison.
Judge Hollister-Jones said Rua's pre-sentence report showed Rua had declined to agree to electronic sentencing, meaning home detention was not an option.
The judge said he was also reluctant to keep Rua in the community given he did not express remorse and had indicated he would continue to use drugs.
"You have drug supportive attitudes therefore I am not going to leave you in the community."
Judge Hollister-Jones said there was a need to hold Rua to account and send a message that dealing in psychoactive substances, even small amounts, would result in prison sentences.