From: "François Boone" Date: 2010-02-18T06:57:52+09:00 Subject: Re: CSV: what is the problem ? James Edward Gray II wrote: > It means that in Ruby 1.9 the old CSV library was replaced by the > FasterCSV code base. FasterCSV (now renamed to CSV in 1.9) has a > slightly different interface. The call above would need to be > translated to that new interface: > > CSV.parse(a, :col_sep => ",") > > In this case though, it would be better to leave out the separator, > since it is the default. > > Hope that helps. > > James Edward Gray II Ok, I did not understand something!. I have updated my ruby from 1.8.6 to 1.9.1 I used with ruby 1.8.6 FasterCSV.foreach(fichier, :col_sep =>';', :row_sep =>:auto) do |ligne| where 'fichier' in the name of my file and all is ok Now, I have to change this line to use my program with ruby 1.9.1: CSV.foreach(fichier, :col_sep => ";") do |ligne| gives /usr/local/lib/ruby/1.9.1/csv.rb:1329:in `initialize': can't convert String into Integer (TypeError) from /usr/local/lib/ruby/1.9.1/csv.rb:1329:in `open' from /usr/local/lib/ruby/1.9.1/csv.rb:1329:in `open' from aipsa2.rb:63:in `
' I check http://ruby-doc.org/stdlib/libdoc/csv/rdoc/index.html however no example is given with ";" separator. Thank you for help -- Posted via http://www.ruby-forum.com/.