From: sto.mar@... Date: 2012-11-23T04:02:06+09:00 Subject: Re: CSV:mode must be 'r', 'rb', 'w', or 'wb' Am 22.11.2012 13:07, schrieb ajay paswan: > Why this code is giving error: > > code is: > CSV.open(filename, 'a') do |csv| > csv<<[a,b,c,d] > end > > Error is: > > mode must be 'r', 'rb', 'w', or 'wb' > > Note: I want to append. A quick search for the error message shows that this is a Ruby 1.8 issue... With Ruby 1.9.3-p194 it works perfectly. --