Ok, thanks for help :) It didn't wokr only with Neatbeans. I siwtched to 
Linux and run the script using console. It wokrs fine :)

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