The difference is that neither Gandalf nor Deagol ever actually wore the Ring, they only handled it for a sort period of time. Tom actually "put the Ring round the end of his little finger." I mean Ring-bearers to be those who have actually put the Ring on :)
gandalf never actually held the one ring, despite common belief. most people THINK that he did because in the movies he held the envelope that contained it, and he touched the one ring briefly. but if this is considered holding the ring then boromir technically held the ring too (in the movies) when on caradras he held up the one ring by the chain, but this is never considered as him holding the one ring. but deagol is a bearer of the one ring in the eyes of most lotr nerds because he held it in his bare hands, (despit never wearing it), and did not just touch it as gandalf did in the fellowship of the ring (movie). tom bombadil also was a bearer of the one ring because it is described in the books as him putting on the one ring and it having no effect on him. so the order of the bearers of the one ring (in order as is commonly accepted) sauron, isildur, deagol, smeagol/gollum, bilbo, frodo, tom bombadil, sam.
He did wear it in the books, when Frodo was taken by the orcs after being attacked by Shelob. The road to the Tower of Cirith Ungol in a maze and Sam puts the ring on in order to follow the orcs and find the secret entrance to the tower.
The characters listed in the quiz are the only ones to ever actually wear the ring. I'm not sure if that's the definition of ring bearer or not, but that is why Characters like Gandalf and Deagol aren't listed. It's a fun little quiz, Thank you to the creator!