I HATE rats. I REALLY hate rats!!! I had a fairly large farm; 2 houses down the street from me the guy wouldn't pay for trash pickup, and for all the years he lived there, he just threw his garbage sack into his detached garage, stacked clear up into the rafters. I saw rats bigger than my barn cats sunning themselves in his driveway in broad daylight. The guy across the road had horses and just stacked his feed sacks on the dirt floor of his barn. When the young rats hit puberty, they go on the overland trail to find new territory, and more than once I saw rats crossing the road toward my place in the middle of the day. These are serious rat infestations.
Rats are a very big problem. Ask any health inspector. I caught one in a rat trap in a bedroom at that farm that was so big only the head fit under the wire, it was nose to jawbone from the center bait to the wire that broke it's neck. They carry diseases that can make you, your birds, and your animals sick, even die. I've seen a horse barn so polluted with rats that it looked like the move Willard if you went in there after dark with a flashlight, and they were eating the horses' hoofs while they stood in the stalls at night. They urinate on everything as they travel along, spreading diseases like leptospirosis which can cause permanent liver damage . They can chew through brick and mortar, and they do this by urinating on it then chewing on it until they get through. They will bite toes or worse off chicken sleeping at night. They will start on you for dinner at night when you are asleep if your house is infested, and while they are doing it they'll give you rat-bite fever.
You have to take several approaches, starting with denying them the food and shelter they came for. Never store your feed in sacks or on the floor, put it in metal cans, or if you have a lot, old freezers work well. Plastic garbage cans are a waste of money, rats chew right in. If you compost, make sure you are really composting, as in, it's getting hot in there, and turn it over regularly to keep it hot until it's done, and don't put meat scraps in there. Clean up any junk and debris laying on the ground that they can tunnel run entrances and nest under. Dogs that will attack rats are good; most cats have trouble killing a large rat by themselves but some can do it. Mine actually had to team up 2 together and corner the rat somewhere and then it was my job to kill it for them. After that, in a serious infestation, poison is the only thing that is going to work.
The people objecting to poison are correct, it's a huge danger to wild predators, and also to your own dogs and cats if any of them catch and eat a rat that is sick on it, which is what made it easy to catch in the first place. Rats, especially in cities, have developed immunity to the most common and cheap poisons containing warfarin; research around and find out what is effective in your area, and know that this might be the most expensive. Use the kind that comes in solid pieces rather than "grain", it won't get scattered where other animals can eat it. I've had success with Just One Bite bars.
If you put out poison, you have to put it where none of your animals or wild animals can find it and eat it. This means putting it somewhere like under the floor of your coop or barn, or under a heavy bait box other animals can't tip over, where only the rodents can reach it. Pushing it deep down rat holes with a stick works. Once you put out poison you have to patrol your area daily looking for any dead or sick rodents who made it above ground looking for water, and you'll have to kill any that are still alive. If you aren't diligent about finding and disposing of any bodies, your chickens will cheerfully eat them and poison themselves, likewise your pets, and your wildlife, so you have to be very conscientious, and for a very long time. It's a lot easier to keep them out in the first place. Did I mention that I HATE RATS!