From: Brian Candler Date: 2010-08-16T23:27:29+09:00 Subject: Re: how to sove the loaderror? > any advices appreciated. (1) Don't use class variables (@@myfile): the value will be shared between all three threads, and they will stomp on each other. A local variable (myfile) is what you want here. (2) Do your error handling within the thread code, so you don't need to mess with @@myfile to get sensible error reports outside. Or simply set: Thread.abort_on_exception = true at the top of your file. This will let you see the next problem: (3) change net::HTTP to Net::HTTP This creates /tmp/ALP/n with a 404 error in it. This seems reasonable to me, since if I go to http://table.finance.yahoo.com/table.csv?s=ALP/N in a normal web browser, I also get a 404. So the next thing you need to do is to work out what URLs you actually want to download. The command-line tool "curl" is helpful for this, and of course, reading the documentation for the API you're trying to use. -- Posted via http://www.ruby-forum.com/.