A friend of mine had a problem with rats coming into her house. For unrelated reasons she sprinkled Arm & Hammer Pet Fresh on her carpet, and noticed that the rats quit going into that part of the house. I bought some and sprinkled it pretty generously in my RV and for about three weeks I’ve been mostly rat-free — sometimes they come in and I hear them in the cupboard, but they don’t stay more than a few minutes. It’s as if they become overwhelmed and can’t take the sensory overload. I also have an area in my shop where they were chewing a lot, so I dropped a clump of it there and the rats now leave it alone. There were a few footprints in the powder the first night, and there have been none since.
I don’t know if rats just dislike the smell of this stuff or if it has some allergic or neurological effect — doesn’t matter. So far, it’s working. It’s not expensive and it smells pretty good, too — unlike the peppermint stink bombs I tried that everyone insisted smelled great when in fact they were unbearable and also gave me dry-mouth at night, with the added bonus that they didn’t repel rats. At all. Not even a little bit.
So if you have a specific, indoor area you want to keep the rats out of, this might be what you need. Here’s a picture of what I bought:

Best of luck, and if anyone from Arm & Hammer is reading this, you should send me some free Pet Fresh for promoting yo shit.
Very quickly, because I have a date with some firewood that I need to get to, I also bought a GoodNature rat trap that I have set up in my yard. It has not killed any rats yet, so I will probably need to move it someplace else. I’ll keep you updated.