Displaying 20 results from an estimated 100000 matches similar to: "Multiple header rows with FasterCSV?"
2009 Feb 09
9
fastercsv, freezing into vendor/gems
I''m using fastercsv such that in my rake file I''m doing this.
require ''fastercsv''
It works fine on my Mac.
I need to freeze this gem into the app though so my rake tasks work on
the production machine.
-----------
I spent about two hours though this weekend trying to get this Gem
"frozen" into the vendor/gems folder. I tried all sorts,
I ...
-
2008 Jul 18
4
gem question on hosted service
All,
This may be a gem question (not rails) but I feel sure someone else on
this list has seen this issue go by. I use a hosting service that has
ROR available, but I am among the few developers using it. I am
developing on a local linux box, and have been very careful to NOT use
any extra gems because I might have a problem with my provider.
Well ... fastercsv rocks and I wanted to use it.
My
2007 Nov 13
0
FasterCSV: ignoring returns within a db field
Hello,
my goal is to import data into a MySQL-Database using FasterCSV:
Does anyone have an idea how I can force FasterCSV to ignore carriage
returns that occur within(!) a database text field and to read until
"line feed" = end or row is reached? I tried to use option ":row_sep"
but it did not work, it still uses the returns within the text field as
end of row, too:
2009 Aug 05
1
How do I use fastercsv to just read the header row and not the whole file?
How do I use fastercsv to just read the header row and not the whole
file?
I need to read the header row first and not the whole csv file
initially in the web application so I can map the input csv columns to
the db columns. Once the mapping is complete, a rake task will than
process the whole file. I don’t want to read the whole file to save
processing time.
How do I just read the header row
2010 Nov 30
0
Rails 3 & FasterCSV
I''m using FasterCSV to upload some csv files and create some records
based off the data in the CSV files. I''m pretty sure the problem is a
character encoding issue because the CSV is full of French and German
words. If I remove all the accents off the letters, then it uploads
fine, otherwise it just throws a FasterCSV::MalformedCSVError.
jeremy-woertinks-imac:winovations
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/.
2007 Jul 25
3
FasterCSV load file to table
Hello Guys,
May be it is simply but any way.... fasterCSV 1.2.0
how to load data from file to table :( I have tried this:
file has just one line 1,2,3
data = FCSV.read("C:\\temp_file.csv")
table = FCSV.parse(data, :headers => true)
puts "data overview"
puts data
puts "table overview"
puts table
but got very strange error:
undefined method
2009 May 21
0
FasterCSV won't accept :headers option
When I pass :headers => true to FasterCSV.foreach it complains. Without
it it works. Am I doing something wrong?
FasterCSV.foreach(file, {:row_sep => :auto, :col_sep => "\t",
:quote_char => "~", :return_headers => false,
:headers => true}) do |row|
--
Posted via http://www.ruby-forum.com/.
2009 Jan 14
1
setting header in views?
currently iam using FasterCSV to render csv pages
format.csv do
csv_string = FasterCSV.generate do |csv|
# header row
csv << @query_result[0].keys
@query_result.each do |x|
csv << x.values
end
end
#send it to the browser
send_data csv_string,
:type => ''text/csv;
2008 Oct 14
1
Starting Server gives an error
Hi,
I had created a new environment and tried to start the webrick server
for that environment but it is giving an error:-
E:/demo/vendor/rails/railties/lib/commands/servers/
webrick.rb:11: warning: already initialized constant OPTIONS
E:/demo/vendor/rails/activesupport/lib/active_suppo
rt/dependencies.rb:249:in `load_missing_constant'': Expected E:/Demo
2008 May 01
1
Strategy for importing temporary .csv file?
For some reason, I''ve posted this question to this forum 4 times now
and it never appears in the daily consolidated email I get daily?
I''ve written a routine allowing the client user to declare where
their .csv import file resides and then send it to the server to
import the many rows into an existing model table, and then throw it
away.
I''ve imported many graphic files
2007 Feb 05
0
superclass mismatch for class OrderedOptions (TypeError)
ngw@adreadedsunnyday ~/projects/hotchalk$ script/server
./script/../config/boot.rb:28:Warning: require_gem is obsolete. Use
gem instead.
/opt/local/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/initializer.rb:606:
superclass mismatch for class OrderedOptions (TypeError)
from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/
custom_require.rb:27:in `gem_original_require''
from
2006 May 17
6
newbie wants to know..FasterCSV or just CSV?
I''m trying to grab a CSV file from a user and let them upload it
directly to my database, but doing some minor checks on the data before
saving. Which is the easier way to implement this? CSV or FasterCSV? I
saw that perhaps there were some issues with FasterCSV and csv files
created from Mac versions of Excel.
Anyone have any experience with this and can recommend a newbie friendly
2009 Jun 13
3
How Can I insert another column data into the CSV file when I use FasterCSV?
Hi, All,
Suppose I have a CSV file, there is data in it.
* Column 1 Column2 Column 3 Column 4
Row1 a b c
Row2 a2 b2 c2*
You know, the column 4 is no data
Now, I would like to insert data to Column 4, after save, the CSV file will
be:
* Column 1
2009 Nov 10
4
Model spec for file upload with paperclip and fastercsv
I just started my ImportsController and was this was really the way to
go:
////////import.rb/////////////////
class Import < ActiveRecord::Base
has_attached_file :csv
validates_attachment_presence :csv
after_save :process_csv
private
def process_csv
FasterCSV.foreach( csv.path) do |row|
#TODO
end
end
end
/////////import_spec.rb/////////////////
require
2005 Dec 25
0
Simple FasterCSV question
Hello,
I must be unclear on the concept. Why is it that the following code
runs but returns no result?
def read_file
FasterCSV.foreach("./dar.csv") do |row|
STDOUT.puts row
end
end
Thanks so much,
Mike
2008 Mar 25
1
Moving to ROR 2.0.2
Looking for any gotchas:
Currently running ROR 1.2.3 want to move to 2.0.2. I see the
recommendation to move to 1.2.6 fix the deprecations and then to 2.0.2,
which I plan to do.
I am currently running lightty with SCGI (zed shaw''s version 1.7) on
both win and UNIX platforms without issue.
I have looked at the new features and can iron all that out:
- pagination as plug
- adapters as
2007 Oct 25
0
Can't use ruby-rtf gem
I''m new to ruby, rails, and gems, and trying to add an feature to a
RoR''s app so users can export a file, and then edit it using
Microsoft''s Word. (This is an app where telling folks to use
OpenOffice or some other editor isn''t really an option). So I
researched a little and think that using ruby-rtf to create rtf files
is the best way to go. However, I can
2008 Jul 02
1
MySQL gem vs RoR default library
I have Rails v 2.0.2
Ruby v 1.8.6
MySQL db v 5.x
I am confused as to whether we should use the MySQL gem or the RoR
default MySQL support library.
The consultants that had worked on the initial phase of the project
had me remove the gem saying that
it is better to use the RoR library, that the gem was necessary in
earlier version of Rails.
BUT, I get the WARNING below which says the opposite.
2008 Aug 29
4
newbie question for installation
Hi all...
just something really confused.
Today I downloaded "ruby186-26.exe" according the tutorial..
then have it installed without problem
then I use "gem install rails --include--dependencies" to get rails
then when I use "rails testabc" for my first application
I got following errors:
.
..
...
create script/process/reaper
create