1

I want to create and write csv file in ruby on rails. I'm using ruby 1.9.2 version. Most of the sites are recommended Fastercsv. But apart from that how csv is used to create and write csv files in ruby

3 Answers 3

1

FasterCSV is no longer needed in 1.9.2 - use ruby's built-in CSV class. The documentation has plenty of examples to get you started:

http://ruby-doc.org/stdlib-1.9.2/libdoc/csv/rdoc/CSV.html

Sign up to request clarification or add additional context in comments.

Comments

1

hope this will be helpful

http://satishonrails.wordpress.com/2007/06/28/how-to-generate-csv-files-in-rails/

https://github.com/dasil003/csv_builder

http://oldwiki.rubyonrails.org/rails/pages/HowtoExportDataAsCSV

1 Comment

As Thilo has highlighted below, the CSV coolness is now baked into ruby. Although the syntax from FasterCSV is largely preserved in the CSV module these references are unlikely to be particularly helpful.
0

You can use this gem julia_builder, you can export your data pretty easily.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.