HI,
I don’t know why :
FasterCSV.foreach(filename) do |line|
puts “1234”
end
prints nothing but filename has some data and moreover its not giving
any error, I checked it using begin-rescue-end statement.
HI,
I don’t know why :
FasterCSV.foreach(filename) do |line|
puts “1234”
end
prints nothing but filename has some data and moreover its not giving
any error, I checked it using begin-rescue-end statement.
What version of Ruby are you using? I think in 1.9 FasterCSV is just
CSV. This works for me in 1.9.3:
require ‘csv’
CSV.foreach(“purchase.csv”) do |line|
puts line[0]
end
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs