I just want to read a csv file and discard the header row.
When I do csv = CSV.read('file_name.csv','r')
I get
.rvm/rubies/ruby-1.8.7-head/lib/ruby/1.8/csv.rb:98:in `read': can't convert String into Integer (TypeError)
When I do
csv = CSV.open('file_name.csv','r')
csv.shift
I get
.rvm/rubies/ruby-1.8.7-head/lib/ruby/1.8/csv.rb:639:in `get_row': CSV::IllegalFormatError (CSV::IllegalFormatError) from .rvm/rubies/ruby-1.8.7-head/lib/ruby/1.8/csv.rb:567:in `shift'
What is an example of successfully reading csv files and manipulating data in ruby 1.8.7?
edit:
first few lines of file_name.csv
Request, Target
http://www.asdf.com/,http://www.asdf.com/
http://www.asdf.com/_blank,http://www.asdf.com/
"http://www.asdf.com/,",http://www.asdf.com/