Rama thought Mr Gunn was asleep in the car.
Rama, of Rathgar Road, Rathgar, pleaded guilty at Dublin Circuit Criminal Court to withholding information from gardai between January 4 and June 17, 2009. He has one previous conviction.
Judge Martin Nolan noted that, having been raised in Kosovo, Rama may have had a greater reluctance to talk to the police than an Irish citizen, but said he was legally obliged to tell the gardai what he knew. He imposed a two-year jail term.
"I am aware he did not go looking for trouble; trouble came to his door," said Judge Nolan, "but when it came, he behaved inappropriately."
Garda John O'Hara said that gardai had searched a rural area at the back of Dublin Airport and found the body of a male partly submerged in water.
The deceased, Mr Gunn, had been reported missing earlier that month. Gardai launched a murder investigation, which led to the arrest of four people, including Rama.
One man, Kastriot Boza, has already received a six-year sentence on charges of impeding a murder investigation.
Boza was responsible for cleaning up the scene and disposing of the weapon.
Two other men, 'Mr A' and 'Mr B', have yet to come before the courts. Gardai believe Mr A was responsible for the murder and Mr B had helped clean up the murder scene.
Gardai searched Rama's flat on March 16, 2009 and he told them that he knew nothing about the murder. He was later arrested in June following the receipt of further information.
Rama told gardai during interview that he had received a phone call from Boza one morning asking him to give him a lift because he didn't know anyone else with a car.
Rama said he drove to an address in Cabra and three people came out of the house. Boza was carrying a man and told Rama the man had been drinking and taking cocaine.
This man -- Mr Gunn -- had a hoodie covering his head and lay on Boza's shoulder as if asleep.
Rama drove down back roads until he was directed to stop by Mr A. Boza and Mr A carried the man out of the car and returned without him five minutes later. They told Rama the man had gone home.
Rama spoke to Boza later that evening and Boza told him the man was dead and had been killed by Mr A. He told Rama they would both be killed if he said anything.
Garda O'Hara agreed with Michael O'Higgins, defending, that Rama had "unwittingly" become involved and the first he realised what had happened was when Boza told him the man was dead.
Garda O'Hara agreed with Mr O'Higgins that Rama's fears for his safety may be genuine and well founded.
Mr O'Higgins said Rama had come to Ireland in 1996 due to the violence in his homeland and had been a useful member of society.