similar to: Loading the contents of a CSV file to a database

Displaying 14 results from an estimated 14 matches similar to: "Loading the contents of a CSV file to a database"

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
2013 Mar 08
2
Zoo Data
Hi Jakob, dat1<-read.table(text=" TIME, Value1, Value2 01.08.2011 02:30:00, 4.4, 4.7 01.09.2011 03:00:00, 4.2, 4.3 01.11.2011 01:00:00, 3.5, 4.3 01.12.2011 01:40:00, 3.4, 4.5 01.01.2012 02:00:00, 4.8, 5.3 01.02.2012 02:30:00, 4.9, 5.2 01.08.2012 02:30:00, 4.1, 4.7 01.12.2012 03:00:00, 4.7, 4.3 01.01.2013 01:00:00, 3, 4.3 01.01.2013 01:30:00, 3.8, 4.1 01.01.2013 02:00:00, 3.8,
2015 Mar 01
4
scp -rp behavior(SOLVED)
On Sun, March 1, 2015 10:22 am, Richard wrote: > > > ------------ Original Message ------------ >> Date: Sunday, March 01, 2015 10:44:08 -0500 >> From: Mark LaPierre <marklapier at gmail.com> >> To: centos at centos.org, Mark LaPierre <marklapier at aol.com> >> Subject: Re: [CentOS] scp -rp behavior(SOLVED) >> >> On 02/26/15 19:45, Valeri
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 =
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 installed faster_csv gem in my server. I tried running the
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/.
2015 Mar 01
0
scp -rp behavior(SOLVED)
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 <big snip> > Why "slash": /.thunderbird in case of your example? Because if you > do not specify absolute path beginning with / the ssh daemon > prepends your relative path with its `pwd` it runs in, and its > `pwd` is "/") Not so. Consider: $ ssh pi-1 pwd /home/jmr If you examine what is happening, the
2006 Jul 17
1
acts_as_tree and :include
hello there, i have a model that uses acts_as_tree: >class GbEntry < ActiveRecord::Base > acts_as_tree :order => ''created_at DESC'' >end and i want it to paginate, including all children to avoid unnecessary db queries: > @gb_entry_pages, @gb_entries = > paginate :gb_entries, :per_page => 15, :order => ''created_at DESC'',
2006 May 18
1
Feed 2 tables with one Form
hi all, i have a form with several datas given by the user : name, adress , tel etc... When the user press "create" i call an action called "create_stagiaire" which create his account but i also want to feed another table named "demandes" where which i feed with a date given by the user. In my form this date field is writen like this : <%= date_select
2006 Jul 27
7
Newbie question---
I wrote a ruby script that parses a file into key-values like so: class Parser table = { } IO.foreach(''Localizable.strings'') { |line| if line =~ /^ \s* " (.*?) " \s* = \s* " (.*?) "/x table[ $1 ] = $2 end } end I want to store the key-values in different colums on my database so that when I enter a key, it gives me the corresponding value...how
2002 Mar 08
0
PXELINUX: suggestion for improvement
Hi, We're planning to deploy PXELINUX as a primary kernel loader in cluster environment. Problem is that we plan to have IP numbers assigned dynamically while there is no guarantee that all machines has same CPU architecture. This makes IP-based config search algorithm inappropriate for our purposes because we [naturally] expect loaded kernel to match hardware. For this reason I've
2007 Oct 07
10
Rails to English
I am currently using the book "Agile Web Development With Rails" (2005). I am working on a fully function web application that has a shopping cart. The web page displays this, ActiveRecord::StatementInvalid in AdminController#create Mysql::Error: #23000Column ''date_available'' cannot be null: INSERT INTO products (`image_url`, `date_available`, `price`, `title`,