Go southish, use your Good Rod, catch a Sharpedo. You don't even need to train the Sharpedo. Just catch it and battle the twins. It woked wonders for me after I'd failed countless times in Ruby. I think that Sharpedo is in the water South of the gym for a reason- to make it easier to defeat them seeing that Sharpedo has complete advantage over Rock and Psychic. So go and catch a Sharpedo and then return to the gym, you'll beat them in no time! Hope I helped!
Source: Had the same trouble and learned through experience.