From a quick look at the docs, it looks like you can't do it with RubyAudio.
Have you tried watching ruby-mp3info ? I do not know if it will be actively developed, and if it works for several audio formats, but it claims that it can give you the duration of mp3.
An alternative way would be to make an estimate based on bit rate and file length.
source share