Hello,

I have created small program to download files from website. I am using
netbeans and JRuby. When I run program, it downloads files no problem,
however, if I run it outside netbeans, it downloads files of similar
size, but they are corrupted and compare by content shows many
differences.

Code:

def download_to_folder(folder, replay_name,id)
    Dir.chdir("D:\\Starcraft\\Replays\\"+folder)
    writeout = open(replay_name, "w")
    writeout.write(open("http://www.sc2rep.com/replays/download?id="+id.to_s).read)
    writeout.close
  end

Configuration (maybe it helps): Windows 7 64bit, Ruby 1.9.1-p243,
Netbeans 6.8 with JRuby 1.8.7 (2009-11-04 patchlevel 174) [java]
-- 
Posted via http://www.ruby-forum.com/.