In Ruby, before the player can access the hideout, Team Magma has reached Slateport City to steal the submarine from Capt. Stern. After that, the player is free to explore it before moving on.
In Emerald, when the player gets close to the spot in Jagged Pass, the hideout will open up in response to the Magma Emblem that the player recieved at Mt. Pyre.