i solve it myself,add :
urlfile.rewind
it is ok now
-- 
Posted via http://www.ruby-forum.com/.