In my experience dealing with rats in a house, you want to use Victor brand rat traps and modify
them with nails. The Tomcat traps are rubbish - don't bother with those. You're definitely going to want to throw the trap away anyway - definitely don't clean and reuse. They're so cheap
I used shorter nails around the snapping side, and didn't bother with the middle nails. But I've seen where rats have somehow figured it out, and having the extra barricade at the hinge area would force them around to the snap side.
In my attic I also tethered the trap, as the larger rats had the ability to get snapped and live long enough to drag the trap away and hide. I'm not sure that would be necessary on a boat
They also are far less likely to go for a trap if there is other food
available. They are very suspicious animals
and something new like a trap won't be interesting until it's the only thing left. So make sure your food
is WELL secured. No boxed food. No soft plastic bag food. Everything has to be in a hard container. I've even seen them chew through hard plastic (tupperware) containers.
As mentioned, peanut butter works well for bait. It doesn't take much. And I usually put it on the underside of the trigger so they have to work
to get it loose which will more likely cause it to snap.
And lastly, I actually used a motion triggered camera
the trap so that I didn't have to go up to the attic everyday to check it. I'm not entirely sure that aspect would be helpful on a boat, but it could also give you information about how the rat is or isn't interested in the trap. Or maybe show you if there are more than one.