I JUST got over a serious rat infestation. By serious, I mean multiple rats out in the chicken run during the day! Dozens of rats were out at night so thick you couldn't tell heads from tails. The problem with an electric fence is that rats dig under the ground. If you put an electric fence under the ground, the electricity will dissipate into the ground and not shock anything.
I tried snap traps and live traps. Nothing worked. Rats are scary smart. I didn't want to poison either. Not only is it illegal in my town, but I have dogs and my neighbors have cats.
I called four exterminators and the dept. of wildlife. Poison is the only way to get rid of them. It can't just be any poison either. Rats send out young rats to try any new food, and if those young rats die, the others won't eat it. So the poison has to have a 4-5 day delayed death, or it won't work.
These are what we used (below). It took about 4 weeks and we haven't seen a live rat. We are very vigilant about checking for dead ones before letting the dogs or chickens out because we still find the occasional dead rat out in the yard.
https://www.amazon.com/Just-One-Bit...8&qid=1524234144&sr=8-3&keywords=one+bite+bar
That's what we used, and we secured it inside of a 4" PVC pipe so no cat or dog could get to it. I'm an animal lover, and it killed me to poison one of God's creatures, but rats bring raccoons, which kill chickens and will bring down coyotes and bobcats into our yard (we live on a mountain). They also carry diseases. Sometimes you have to weight the risks.
On top of that, we also moved all food inside at night and use a spill-less chicken feeder. All chicken poop is cleaned up every evening. We can't move the water because it's a stream running through our property.