Toshney was released by County in January before playing 13 times for Rovers' Championship rivals.
He had made nine appearances for County after joining the Dingwall side last summer after his release by Celtic.
Toshney came through the Celtic youth ranks and had loan spells with Kilmarnock and Dundee in the top-flight.
Raith Rovers have signed former Ross County defender Lewis Toshney after the 23-year-old left relegated Cowdenbeath.