This is interesting b/c people do have a lot of what seem to be good solutions for an obviously very common problem. But, we live in the country and actually learned from a professional trapper (we heard on tv) that if you live in that type of environment you will always be battling rats, and, he says actually the best thing is snap traps baited with cashews. Just another idea for someone.
We do not have a coop, our chickens and peas are free range. At night they roost in our barn and it is pretty much impossible to make that area free of possible rat housing. And, we live in the woods, so freeing the area of brush and trees is totally impractical. That's why we live here, anyway, we want the brush and trees. Our neighbors surrounding us are primarily farmers and actually we had rats visiting before we ever had any livestock, due to the surrounding farms.
We do pick up the food at night. Our rat problem was originally so bad that the rats were trying to steal the food while our chickens were eating. But as I said, the rat population seems to have decreased a lot since then. Let's hope it continues to. Also keeping feed in steel cans or heavy duty, rat-chew proof bins, is essential.
Just wanted to point this out to show what a terrible problem rats can be, there doesn't seem to be any easy answer, but certainly a lot of possible temporary solutions, especially combined.