> I found my problem.

I think your code is a problem too. Too many $ where it seems useless. 
And no method or class separation ... it's archaic programming similar 
to BASIC. :)

-- 
Posted via http://www.ruby-forum.com/.