In Pokemon Ruby, the only way to complete the unlimited Rare Candy cheat is to use the Gameshark codes for Unlimited Items and Rare Candies (RC). These codes are D261DC6D197B4DC2 and 82025BD0 0044.
To use the codes, a Game Boy Advance SP Gameshark is needed. This device plugs into the Game Boy Advance and has many preloaded codes to use. Once plugged in, enter the codes within the game.
For the Rare Candy cheat, first purchase a potion to put into the PC. Do this by removing the potion from the item list and placing it into a PC at a Pokemon Center. Next, enter the Unlimited Items code, D261DC6D197B4DC2. This creates unlimited items in the PC. Punch in the Rare Candy code to change the potion to the Rare Candy. This code is 82025BD0 0044.