Yes, BUT! It is dangerous to wear ear buds while climbing, especially in the rope area.   Compromised focus can lead to tying in incorrectly, not performing all the required safety checks with your partner, or not clipping into the auto-belay. To top it off, if a person is wearing earbuds they may not hear a person warning them that they are not clipped into an autobelay, back clipping, z-clipping, or performing any other unsafe behavior.   To sum it up, yes, you can wear your earbuds in the gym, but you do so with the knowledge that they can create an unsafe environment for yourself and other Paddies.