-
-
Save jamesgecko/4c72555e484269c1929c 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
geocode_to_zip = {} # line 15 | |
CSV.foreach(geolite_csv) do |locId,country,region,city,postalCode,latitude,longitude,metroCode,areaCode| | |
if country == 'US' | |
puts "#{city}, #{postalCode}, #{metroCode}" | |
geocode_to_zip[metroCode] = postalCode | |
end | |
end |
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
, , | |
/Users/jdent/.rbenv/versions/1.9.3-p448/lib/ruby/1.9.1/csv.rb:1855:in `sub!': invalid byte sequence in UTF-8 (ArgumentError) | |
from /Users/jdent/.rbenv/versions/1.9.3-p448/lib/ruby/1.9.1/csv.rb:1855:in `block in shift' | |
from /Users/jdent/.rbenv/versions/1.9.3-p448/lib/ruby/1.9.1/csv.rb:1849:in `loop' | |
from /Users/jdent/.rbenv/versions/1.9.3-p448/lib/ruby/1.9.1/csv.rb:1849:in `shift' | |
from /Users/jdent/.rbenv/versions/1.9.3-p448/lib/ruby/1.9.1/csv.rb:1791:in `each' | |
from /Users/jdent/.rbenv/versions/1.9.3-p448/lib/ruby/1.9.1/csv.rb:1208:in `block in foreach' | |
from /Users/jdent/.rbenv/versions/1.9.3-p448/lib/ruby/1.9.1/csv.rb:1354:in `open' | |
from /Users/jdent/.rbenv/versions/1.9.3-p448/lib/ruby/1.9.1/csv.rb:1207:in `foreach' | |
from generate.rb:15:in `<main>' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment