I don't have an answer for you; I too ride at the gym and was also wondering if the miles are pretty much equivalent, or if it's like the Stairmaster: 50 flights on the Stairmaster are no comparison to actually climbing up seven floors in real life...
On the other hand, treadmill running is pretty close to road running if you remember to add a couple of degrees of uphill slant to compensate...so maybe the bike in the gym is fairly equivalent.
Hoping someone has good info,
Dagna