28 Apr '12, 6am

open-uri error - Ruby Forum:

I am writing a script to download warcraft 3 replays for me. It got a few (which work) then had an error: URI::InvalidURIError: bad URI(is not URI?): http://ftp.replays.net/ w3g/060607/060606_mYm]Lucifer(UD)_vs_mTw-LasH(Hum)_TwistedMeadows_RN.w3g The URL works in Safari, so I'm not sure what's going on. My wild guess is that Safari accepts technically invalid URLs. Hopefully someone knowledgeable can tell me what the issue is. Here's my code: require "open-uri" path = "/Applications/Warcraft\ III/Replay/auto/" files = Dir.glob "#{path}*" count = 0 urls = `lynx -dump http://war3.replays.net/`.split "\n" urls = urls.select { |url| url =~ %r-\d{1,3}\. http://ftp.replays.net/ w3g- } urls = urls.collect { |url| url.sub(%r-\s*\d{1,3}\.\s*-, "")} urls.each do |url| filename = url.sub(%r-http://ftp.replays.net/w3g/\d*/-, "") if not files.include?(filename) open(url) do |remote_fil...

Full article: http://www.ruby-forum.com/topic/68397

Tweets

@AllenJlawson

ruby-lang.org 28 Apr '12, 9pm

Certain members of the Ruby community feel very strongly that you should never use a package manager to install Ruby, and ...

Open Id Authentication | AgileWebDevelopment #Ruby

agilewebdevelopment.com 28 Apr '12, 6pm

Provides a thin wrapper around the excellent ruby-openid gem from JanRain. Be sure to install that first: gem install ruby...

Ruby Forum - Italian Ruby user group:

ruby-forum.com 01 May '12, 8pm

Forum: Italian Ruby user group Forum List | New Topic | Search | Register | User List | Log In Page 1 >> Subject Author Re...

Open hardware - Creating an open world

Open hardware - Creating an open world

arduino.cc 02 May '12, 7pm

Open hardware – Creating an open world A nice, detailed, well linked article on Open source hardware, its impact and futur...

@JoelTheMighty -- it doesn't open on sundays though

@JoelTheMighty -- it doesn't open on sundays th...

aoki-restaurant.com.sg 28 Apr '12, 3pm

Aoki Restaurant Back Address : 1 Scotts Road #02-17 Shaw Centre Singapore 228208 (Opposite HSBC Bank, Tanglin Branch) Tele...

@ijonas Even Ruby people think that's a bad idea

railstips.org 03 May '12, 9am

The only people that don’t like “unless” are either: A) Old school programmers, which I can understand. B) Blog followers,...