Rubacek made his first Czech team, as a 17-year-old, at the 2004 Summer Olympics in Athens, where he competed only in butterfly and relay freestyle events. He also joined with his fellow swimmers Květoslav Svoboda, Josef Horký, and Martin Škacha in the men's 4 × 200 m freestyle relay. Swimming the lead-off leg, Rubacek recorded a split of 1:51.37, and the Czech team went on to finish heat two in seventh place and thirtieth overall, for a total time of 7:26.26. Few days later, Rubacek won the second heat of the men's 100 m butterfly by approximately one second ahead of Uzbekistan's Oleg Lyashko, with a time of 54.87 seconds. Finishing only in thirty-ninth place, Rubacek failed to qualify for the semifinals.