We investigate the elastic buckling of a triangular prism made of a soft elastomer. A face of the prism is bonded to a stiff slab that imposes an average axial compression. We observe two possible buckling modes which are localized along the free ridge. For ridge angles ϕ below a critical value ϕ⋆≈90∘ experiments reveal an extended sinusoidal mode, while for ϕ above ϕ⋆ we observe a series of creases progressively invading the lateral faces starting from the ridge. A numerical linear stability analysis is set up using the finite-element method and correctly predicts the sinusoidal mode for ϕ≤ϕ⋆, as well as the associated critical strain ϵc(ϕ). The experimental transition at ϕ⋆ is found to occur when this critical strain ϵc(ϕ) attains the value ϵc(ϕ⋆)=0.44 corresponding to the threshold of the sub-critical surface creasing instability. Previous analyses have focused on elastic crease patterns appearing on planar surfaces, where the role of scale-invariance has been emphasized; our analysis of the elastic ridge provides a different perspective, and reveals that scale-invariance is not a sufficient condition for localization.