>A way to fix this is to have 2 GBAs(game boy advance) one GBA has your sapphire and the other one, has a Fire red/leaf green. Then turn on your GBA that has The Fire red/leaf green, then get to the screen where charizard or venasaur appears, and press b + select. THis will take you to a screen so just follow the directions. Alright, I hope your game gets fixed. (by the way, this should work, however, and I hope you don't get discouraged, but it didn't work for my friend, but it did work for me, so I wish you luck, so that your game gets fixed.
Source
If you don't have another GBA and FR/LG, then you probably need to buy a new Ruby or Sapphire that doesn't have the battery dry.