Displaying 20 results from an estimated 1000 matches similar to: "Model spec for file upload with paperclip and 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 ...
-
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
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:
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/.
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/.
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 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
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
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
2007 Jul 25
0
Multiple header rows with FasterCSV?
Hi,
So I''m new to RoR and have been playing around with the FasterCSV gem.
One thing I can''t figure out is how you get it to skip multiple header
rows. I can do one row no problem. But 2 or more is completely beyond
me. Any suggestions?
Cheers,
Nick
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
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 Jul 28
1
[PAPERCLIP] How to avoid image crop in paperclip styles
Hello All,
I am using rails paperclip plugin for image upload.
my image has different styles and the original image gets cropped
while processing styled image.
I dont want image to be cropped.
Is there any way ????????
Thanks,
Sandip R~
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails:
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
2011 Aug 13
1
Paperclip - could not find generator.
Hello there,
I installed plugin "paperclip" for working with images, but after
running a command
--
rails generate paperclip user avatar
I am getting error
--
Could not find generator paperclip.
If I will try run a command
--
bundle show paperclip
So I will get
--
/Library/Ruby/Gems/1.8/gems/paperclip-2.3.0
In Gemfile I have
--
gem "paperclip", "~> 2.3"
I
2011 Nov 21
1
uninitialized constant Sass::Script::Functions::EvaluationContext
Hi, after deploying a bunch of modifications to my web app... I get the
error attached trying to load the page (see attached file). This is my
environment.rb file:
config.gem ''warden''
config.gem ''devise'', "~> 1.0.9"
config.gem "role_model"
config.gem "formtastic", :version => "~> 0.9.10"
config.gem
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
2008 Sep 17
1
Stubbing Paperclip calls to Amazon S3 (for Rspec)
Would anyone happen to know how to stub a call to S3 from Paperclip?
I''ve searched every where and no one seems to have posted anything about
this. I''ve done very little in the way of spec''ing dependencies on
external services, so any ideas on how to do this with Paperclip & S3
would be most appreciated. I''m happy with stubbing out Thinking Sphinx -
would
2010 Aug 22
0
Paperclip - possible to modify file and load file content as string?
Wanted to see if anyone knows of a way - or the preferred way - to do these
three tasks with Paperclip:
1) Access the content of an uploaded file before save. I did find that the
following works before save, but is there a clearer way to do this:
self.uploaded_file.queued_for_write[:original].open.read
2) Access the content of a file after save while my AR model instance is
still alive and/or
2012 Jan 25
0
Paperclip preserve files ?
Hi,
I am using paperclip to upload files. The problem I am facing is,
based on my object property I need to preserve my file. Means my object
should be deleted from db but the file need to be restored.
I am using the option :preserve_files => true.
If I keep the above option in model it will be access to all the
objects of the model. I need to restore only for limited objects.
2009 Aug 17
0
Paperclip: processor proc not firing
Hi
It''s extremely rare that I have to post something on the Rails list,
but this is one of those times that I''ve been completely stuck for
countless hours.
Environment: Rails 2.3.3
I''ve implemented a custom processor proc for video thumbnailing with
Paperclip (latest trunk version as git submodule, and yes, it''s
updated) using the instructions posted