Questions tagged [smartercsv]
29 questions
0
votes
0 answers
unexpected keyword_rescue, expecting keyword_end (SyntaxError)
I'm facing this issue while using 'smarter_csv' gem in a ruby CLI script using version 2.4.1.
The gem is installed successfully but upon using, I get…
0
votes
0 answers
Parsing a tab delimited file with Smarter CSV merges all headers into one long header
I'm trying to parse a simple tab-delimited file with Smarter CSV, but regardless of what I try, when parsed, all the headers get merged into giant headers. Here is an example file:
Date Total Time
2017-09-06 1.1
The output will always look like…

Arel
- 3,888
- 6
- 37
- 91
0
votes
2 answers
rails rake task with globally installed gem
I'm trying to write a rake file to import data from csv, and I want to use smarter_csv gem. I have the gem installed globally (I don't want to add it to my Gemfile because it's a one-off task).
In my rake file I require 'smarter_csv' but when I run…

jbmoon
- 129
- 1
- 11
0
votes
1 answer
Ruby SmarterCSV gem keep blank strings
The SmarterCSV wiki page for Basics says that it's possible to retain blank strings for columns that don't have any data (consecutive commas), but I couldn't find additional information on how to do that.
I assume it's something to do with the data…

sameers
- 4,855
- 3
- 35
- 44
0
votes
1 answer
SmarterCSV and resque results in undefined method close
I am trying to use Resque and SmarterCSV but keep seeing the same error:
undefined method 'close' for nil:NilClass
in my resque logs. I'm not sure why it's happening. I've done some digging and people who have seen this found it has to do with…

Jeremy Thomas
- 6,240
- 9
- 47
- 92
0
votes
1 answer
no implicit conversion of String into Hash (smarter_csv gem, uploading a file with an imput)
I'm trying to save the info of a csv that have unicode characters into mysql on a Rails app,
The code error says:
TypeError in ImporterController#upload
no implicit conversion of String into Hash
and the issue comes int this line
@csv =…

Marcos R. Guevara
- 5,258
- 6
- 19
- 44
0
votes
0 answers
failed to allocate memory
I have a large csv file which is 12 mb in size. I do have a 12 Gig of RAM in my laptop but I am still running out of memory. I have rebooted my laptop and started the program fresh but I still have issues. I am using SmarterCSV hoping that it will…

junkone
- 1,427
- 1
- 20
- 45
0
votes
1 answer
unable to run rake task with smarter_csv
I created a rake task for import a csv with smarter_csv gem.
Throws the following message, i added the entire error code if it helps:
rake import_csv:import_csv
Digest::Digest is deprecated; use Digest
I, [2017-03-01T11:46:08.551994 #7029] INFO --…

Marcos R. Guevara
- 5,258
- 6
- 19
- 44
0
votes
1 answer
RoR - import csv to MySQL DB with smarterCSV gem
I'm trying to upload a csv file with a lot of posible clients (15000) on a MySQL table. I want to keep on a table for later retrieve info, complete forms and make users.
Now i'm on the beginning, trying to import the csv to the MySQL.
I read some…

Marcos R. Guevara
- 5,258
- 6
- 19
- 44
0
votes
2 answers
Rails: designing a model with unknown attributes
In my app I have a model called Address. The address field therein is the only required field, but the model can have any number of different other attributes.
Addresses will be created by importing rows from a .csv file. The CSV has to have an…

t56k
- 6,769
- 9
- 52
- 115
0
votes
1 answer
Ruby - CSV works while SmarteCSV doesn't
I want to open a csv file using SmarterCSV.process
market_csv = SmarterCSV.process(market)
p "just read #{market_csv}"
The problem is that the data is not read and this prints:
[]
However, if I attempt the same thing with the default CSV…

bsky
- 19,326
- 49
- 155
- 270
0
votes
0 answers
Read CSV file, modify its content and write to S3 Rails
I am trying to read csv file uploaded to s3 server, then modify its content and then write it back to the server.
For reading i am using the following code..
object=bucket.objects['test.csv']
url= object.url_for(:read, :expires => 10*60,…

Manish
- 108
- 10
0
votes
2 answers
ruby on rails import csv from upload file to Active Records using Smarter csv
I hit a roadblock here and need help. I want to be able to import csv file to my Active Record. Either with SmarterCSV or some other way
Here is my database
create_table "ques", force: true do |t|
t.integer "rikt_nr"
t.integer "start_nr"
…

Cyrus Zei
- 2,589
- 1
- 27
- 37
-1
votes
2 answers
how to migrate mailbox from cpanel to smartermail
Is there anyway for me to migrate mailbox from cpanel mail to smartermail?
I've google regarding to this issue but do not find any clue of how to do it.

Mokh Tar
- 3
- 1