From: "Ilán Terrell" Date: 2003-09-09T08:35:00+09:00 Subject: "Moved Temporarily"? --Apple-Mail-4-1005026642 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=ISO-2022-JP; format=flowed When trying to run the following code from "Programming Ruby" I get an error message stating Fetching: www.rubycentral.com Fetching: www.awl.com Fetching: www.pragmaticprogrammer.com Got www.rubycentral.com: OK /usr/lib/ruby/1.6/net/protocol.rb:221:in `error!': 302 "Moved Temporarily" (Net::ProtoRetriableError) from /Users/ilanterrell/Documents/ RubyScripts/threads.rb:20:in `join' from /Users/ilanterrell/Documents/ RubyScripts/threads.rb:20 from /Users/ilanterrell/Documents/ RubyScripts/threads.rb:20:in `each' from /Users/ilanterrell/Documents/ RubyScripts/threads.rb:20 I am pretty new to ruby and I don't have the slightest clue what "Moved Temporarily" means. I have tried this on multiple platforms and get the same error. Any ideas? #!/usr/bin/ruby require 'net/http' pages = %w( www.rubycentral.com www.awl.com www.pragmaticprogrammer.com ) threads = [] for page in pages threads << Thread.new(page) { |myPage| h = Net::HTTP.new(myPage, 80) puts "Fetching: #{myPage}" resp, data = h.get('/', nil ) puts "Got #{myPage}: #{resp.message}" } end threads.each { |aThread| aThread.join } ーテレル イラン --Apple-Mail-4-1005026642 Content-Transfer-Encoding: 7bit Content-Type: text/enriched; charset=ISO-2022-JP When trying to run the following code from "Programming Ruby" I get an error message stating FFFF,3D87,2B66Fetching: www.rubycentral.com Fetching: www.awl.com Fetching: www.pragmaticprogrammer.com Got www.rubycentral.com: OK /usr/lib/ruby/1.6/net/protocol.rb:221:in `error!': 302 "Moved Temporarily" (Net::ProtoRetriableError) from /Users/ilanterrell/Documents/ RubyScripts/threads.rb:20:in `join' from /Users/ilanterrell/Documents/ RubyScripts/threads.rb:20 from /Users/ilanterrell/Documents/ RubyScripts/threads.rb:20:in `each' from /Users/ilanterrell/Documents/ RubyScripts/threads.rb:20 I am pretty new to ruby and I don't have the slightest clue what "Moved Temporarily" means. I have tried this on multiple platforms and get the same error. Any ideas? 2827,182E,FFFF#!/usr/bin/ruby require 'net/http' pages = %w( www.rubycentral.com www.awl.com www.pragmaticprogrammer.com ) threads = [] for page in pages threads <<<< Thread.new(page) { |myPage| h = Net::HTTP.new(myPage, 80) puts "Fetching: #{myPage}" resp, data = h.get('/', nil ) puts "Got #{myPage}: #{resp.message}" } end threads.each { |aThread| aThread.join } Hiragino Kaku Gothic Proーテレル イラン --Apple-Mail-4-1005026642--