William Docherty "lost the plot" when a woman told him she had been raped by Mark Feeney.
Paisley Sheriff Court heard Docherty struck Feeney twice on the head with a hammer before the victim managed to shut the door."
Docherty, 38, handed himself in to police three days later.
Feeney was taken to Paisley's Royal Alexandra Hospital where he was treated for a 3cm cut to the left side of his scalp. Sheriff Robert Fife jailed Docherty, previously locked up in the 1990s, for 16 months.