-
-
Save bkilshaw/806e41d7208ffe94f6cf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>> require 'open-uri' | |
=> true | |
>> require 'csv' | |
=> true | |
>> csv = open("http://www.cbsa-asfc.gc.ca/bwt-taf/bwt-eng.csv") | |
=> #<StringIO:0x00000100842f00> | |
>> puts CSV.parse(csv.read, ";;") | |
TypeError: can't convert String into Hash | |
from /Users/bradkilshaw/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/csv.rb:1554:in `merge' | |
from /Users/bradkilshaw/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/csv.rb:1554:in `initialize' | |
from /Users/bradkilshaw/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/csv.rb:1362:in `new' | |
from /Users/bradkilshaw/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/csv.rb:1362:in `parse' | |
from (irb):4 | |
from /Users/bradkilshaw/.rvm/rubies/ruby-1.9.2-p180/bin/irb:16:in `<main>' | |
>> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment