search for: faster_csv

Displaying 7 results from an estimated 7 matches for "faster_csv".

2008 Nov 05
0
closed stream occured while loading faster_csv
Hi, In my application i am using faster_csv gem to process csv file export to the client through web request. Where as in the respective controller i am requiring the gem faster_csv. But at sme times i am getting the IO:closed stream error. Which says that this error occures while loading file ''faster_csv''. I have install...
2006 Mar 21
8
Loading the contents of a CSV file to a database
...stalled FasterCSV and successfully listed the contents of the csv file. I thought it would be a simple step to loop through the file and insert the values in to the db. In addition to the generated admin_controller.rb file containing list, update etc i put def csv_preview require ''faster_csv'' @csv_trans_action = FasterCSV.read("c:/nugget/statement.csv") end def csv_load require ''faster_csv'' @csv_trans_actions = FasterCSV.read("c:/nugget/statement.csv") for trans_action in @trans_actions for csv_trans_action in @...
2009 Jun 17
12
FasterCVS and Rails
Hello all, I''m trying to import some csv data (that has latin characters) using faster csv but I keep getting a MalformedCSVError: "Unclosed quoted field on line 1." "/ruby/lib/ruby/gems/1.8/gems/fastercsv-1.2.3/lib/faster_csv.rb:1592:in `shift''" I''ve tested the same code outside of the Rails application an it works fine. Can anyone help me? Here is the code: csv_options = { :headers => false, :return_headers => false, :skip_blanks => false } csv_file_name = File.dirname(__FILE_...
2006 Aug 16
2
installing fastercsv into vendor directory
I am using fastercsv to process input files. I want to install it into my app/vendor directory as a gem (I guess). I used ''rake rails:freeze:gems'' to get rails into the vender dir. But I cannot find any doc on how to do it for fastercsv or any third-party gem. Any help appreciated. -- Posted via http://www.ruby-forum.com/.
2005 Dec 07
4
Importing data for excel file or csv file
hey, i have this website (with ajax also) with lot of records of employee, and as an extra feature i want that the customer can import his employeelist (perhaps 100+ records), lot of work to do this manually. i would create a template like this Firstname Lastname Phone xxxx xxxxx xxxxx yyyy yyyyy yyyyy then they upload the excel file or save it as csv file
2007 Jun 06
2
lookup in CSV recipe
I await Luke''s node settings implementation with interest. At the moment however, I have this sort of ugliness: $site = $hostname ? { fred => "opsera", barney => "bedrock", default => "unknown site", ... } So I''ve knocked up this little function to use CSV files instead. Now I can just do: $site =
2006 Sep 05
5
cattr_accessor
Hi, i''ve been playing with ror for a little over two months now, and was wondering wether someone could explain to me what was cattr_accessor and if it is still in use. . . i looked up in api.rubyonrails.com and coulnd''t find any documentation... is it a useful/worth learning method? what do u use it for? -- Posted via http://www.ruby-forum.com/.