Where is the rat when you trying to shoot it ? If it's in the open .. that's your problem right there. Rats don't like being out in the open. Give them a roof over their heads and they're far happier to sit around a while.
I like to bait them and air rifle them and I do so by putting the bait on the upper face of the bottom plank on a fully boarded pallet. Push the pallet against a likely entry point and sit well-enough back so you can and shoot under the pallet. Ratty will come in the back, under the pallet, smell the bait and move forward to it, feeling safe because it has a roof over it. The rest should be obvious ...