Skip to content

Instantly share code, notes, and snippets.

@fender21
Created June 5, 2011 18:53
Show Gist options
  • Save fender21/1009273 to your computer and use it in GitHub Desktop.
Save fender21/1009273 to your computer and use it in GitHub Desktop.
csv help!
namespace :address do
task :import do
file_name = 'data.txt'
puts 'Started Importing'
require "csv"
CSV.foreach(file_name, :quote_char => '"', :col_sep =>'\t', :row_sep =>:auto) do |row|
puts row[0]
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment