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.
on 2012-11-22 13:07
on 2012-11-22 20:03
Am 22.11.2012 13:07, schrieb ajay paswan: > > 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.
on 2012-11-23 09:00
unknown wrote in post #1085940: > Am 22.11.2012 13:07, schrieb ajay paswan: >> >> 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. but am using ruby 1.9.3p327.
on 2012-11-23 22:07
ajay paswan wrote in post #1085970: > unknown wrote in post #1085940: >> Am 22.11.2012 13:07, schrieb ajay paswan: >>> >>> 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. > > but am using ruby 1.9.3p327. Sure you don't have two versions installed at once? Try adding to the top of your script: puts RUBY_DESCRIPTION
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.