The 23-year-old centre-back only joined Northampton in February, recruited on a free transfer, but it was known to be a risk given the serious knee injury he suffered whilst with Getafe in Spain the previous year.
He then signed for Kidderminster Harriers on loan but played just once and whilst he did join Cobblers on their recent pre-season tour to Scotland, he appeared only briefly in pre-season and has now been allowed to leave permanently for Raith, who play in the Scottish Championship.
"Ryan leaves with our best wishes," said manager Jon Brady. "His opportunities here would have been limited moving forwards and it is in everyone's interests that he is playing regular first team football. We wish him well at Raith."