I had this same problem. My husband wanted to get rid of the chickens right away b/c rats are gross. We were already storing the food in proper grain bins in the barn, but the rats found their way to the coop and when I'd go to close the coop at night, my husband would show me how they were hiding in the coop. UGH! I ended up taking their food away during the day, and putting their food in the coop with them when I was locking them in for the night. (My chickens free range during day and I lock their coop up when it gets dark) So, they'd eat the food in the evening and early morning before I let them out. So the rats learned there was no more food. Also, I always feed pellets b/c less waste/less attraction for rats. Our next step if this didn't work was to set up the havaheart traps and bait them with chicken food. We would have drowned the rats as we caught them. We didn't have to take this next step b/c winter came and the rats seemed to go away. I also have a rat zapper trap which was over $30- never caught 1 rat with it though!