Ruffels, who began his career with the U's as a youngster, has been training with club this summer and is seen as an addition to the development squad rather than going straight into Chris Wilder's first team.
The Oxford boss told oufc.co.uk: "The development squad looks strong and Josh is a player we think has every chance of coming through and being a first team player on a regular basis.
"He is an Oxford lad who perhaps slipped through the net when he was a boy. The way the club has rebuilt the youth side of things means that we are now able to attract good players with great potential again.
"He is level-headed, wants to work hard at his game, and we are delighted that he has committed his future to the club."
Ruffels left the U's for Coventry before he was 10. He made his first-team debut for the Sky Blues against Crystal Palace in the Championship in 2011.
- Sports & Recreation