R
Ronald R.
Hi all,
I am trying to generate a CSV with the code bellow:
csv_string =3D CSV.generatecol_sep =3D> "\t") do |csv|
csv << ["row", "of", "CSV", "data"]
csv << ["test", "a=C3=A7=C3=A3o"]
end
But when I try with Ruby 1.8.7 I get the follow error:
ruby-1.8.7-p249/lib/ruby/1.8/csv.rb:326:in `initialize': can't convert
Hash into String (TypeError)
And if I try to call the generate methos without arguments, I get a
error too
If I try with 1.9.2 I get the error:
gerar.rb:35: invalid multibyte char (US-ASCII)
gerar.rb:35: invalid multibyte char (US-ASCII)
gerar.rb:35: syntax error, unexpected $end, expecting ']'
How to fix this?
-- =
Posted via http://www.ruby-forum.com/.=
I am trying to generate a CSV with the code bellow:
csv_string =3D CSV.generatecol_sep =3D> "\t") do |csv|
csv << ["row", "of", "CSV", "data"]
csv << ["test", "a=C3=A7=C3=A3o"]
end
But when I try with Ruby 1.8.7 I get the follow error:
ruby-1.8.7-p249/lib/ruby/1.8/csv.rb:326:in `initialize': can't convert
Hash into String (TypeError)
And if I try to call the generate methos without arguments, I get a
error too
If I try with 1.9.2 I get the error:
gerar.rb:35: invalid multibyte char (US-ASCII)
gerar.rb:35: invalid multibyte char (US-ASCII)
gerar.rb:35: syntax error, unexpected $end, expecting ']'
How to fix this?
-- =
Posted via http://www.ruby-forum.com/.=