A ray gun was a type of directed energy weapon commonly found in science fiction references.
In 1986, Commander Pavel Chekov was being interrogated by an FBI agent while on board the aircraft carrier USS Enterprise, after collecting photons from the ship's nuclear reactor to re-crystallize dilithium on the HMS Bounty. While the FBI agent was distracted, Chekov picked up his Klingon disruptor and warned the agent he would stun him. The agent told Chekov to calm down and give him the "ray gun". (Star Trek IV: The Voyage Home)
When Loomis saw T'Pol's phase pistol, during her and Jonathan Archer's visit to 2004 Detroit, he told her that she had a "nice ray gun" and didn't believe "that thing's for real" until she shot a hole in his car door. Later when he was arrested by the Detroit Police, he warned them that they had to find the lizard people, but to be careful because "they've got ray guns." (ENT: "Carpenter Street")
When Tom Paris was debriefing Kathryn Janeway on the technology of The Adventures of Captain Proton, he told her to remember that it is a "ray gun, not phaser. Imagizer, not viewscreen. Earthlings, not Terrans." (VOY: "Bride of Chaotica!")