There isn't a glitch to do that, but you can use GameShark or ActionReplay codes.
2 ways. no 1.Dont worry about gameshark get Action Replay.No 2. type in a code (I dont know what it is) to get 999 rare candies (when you use one you still have 999 so its the same as unlimeted)
2344569yfk
ya mum
I got more rare candy in emerald by gameshark code and I trade them to ruby
You can get three rare candies in Pokemon ruby sapphire and emerald
There are five Rare Candies.
361e3876????ba79 There is another way also. Write this code in the codebreaker advance : 82025bd0 0044. Then go to your pc. Withdraw items. There will be only limited amount rare candies but you may withdraw as much as you like. hey waht does ???? mean and is this for the gameshark There is also this code, 82025BCC 0044. But make sure that all items are out of the PC before taking them out. Otherwise they transform into rare candies. Also it will show RARE CANDY X 0. But don't worry. Withdraw 1 rare candy and it will show RARE CANDY X ?SOMETHING. Meaning infinite.
use the itemfinder
It is not possible to legitimately get infinite rare candies in Pokémon Ruby. To do such a thing you would have to use Action Replay.
you can't without hacking
I the code is: 280ea266 88a62e5c That sould give you 99 rare candy in the pc. NOTE: some cheats are the same in pokemon ruby and in pokemon ruby destiny like the rare candy. Hope I helped ;D