Real Betis have lured Rubi away from Espanyol and appointed the Spaniard as their new head coach.
The 49-year-old guided Espanyol to a seventh-place finish last season, but he has departed the Catalan club after just one year at the helm to take charge at Betis.
A compensation package has been agreed between the two LaLiga clubs and Rubi, who also guided Huesca into the Spanish top flight last year, will now take over from Quique Setien - sacked last month after a disappointing second half to the season.
Espanyol have wasted no time to appoint Rubi's successor, meanwhile, as David Gallego has been promoted from the B side.
Gallego previously took charge of first-team duties for a month in 2018 following the departure of Quique Sanchez Flores.
Betis finished the 2018-19 campaign in 10th, three points behind Espanyol, who sealed a Europa League qualifying spot on the final day.