 After a series of bad performances upon his recovery and also due to the managerial change at Málaga, Rubén lost his position to Willy Caballero, being further demoted to third-choice after the club signed Carlos Kameni in January 2012.He was loaned to fellow league side Rayo Vallecano for the 2012–13 season.On 23 July 2013, Rubén returned to the Madrid club on a permanent deal, signing a one-year contract.