Impossible. Rayquaza is exclusive to Pokémon Emerald (Generation III). Ruby does not contain Rayquaza at all.
In Emerald: Post-game, at Sky Pillar. Tips: Use Master Ball, or weaken + inflict status (sleep/paralysis) + Ultra/Timer Balls.