I usually wear a jockstrap at the gym, so the only place I get an erection would be the shower, sauna, steamroom, or locker room. I did forget to pack my jockstrap once though. I was on the ellyptical machine running and could feel myself getting an erection a few minutes into my 45-min run. By 30-ish minutes in I had a full erection as I felt the silky fabric of my running shorts brushing my glans the whole time. I ended up managing not to cum, lol, but it was close. It was awkward trying to wipe the machine down and get to the locker room without anyone seeing though.