mossplix has quit [Remote host closed the connection]
cthu| has quit [Ping timeout: 245 seconds]
stryek has quit [Quit: Connection closed for inactivity]
AJA4351 has joined #ruby
xco has joined #ruby
AJA4350 has quit [Ping timeout: 268 seconds]
AJA4351 is now known as AJA4350
kyrylo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dviola is now known as Guest81850
ElFerna has joined #ruby
dviola has joined #ruby
kyrylo has joined #ruby
AJA4351 has joined #ruby
<Cache_Money>
Anyone see anything glaring wrong with how I’m going about adding a custom column to my CSV file?
Nightmare has joined #ruby
AJA4350 has quit [Ping timeout: 276 seconds]
AJA4351 is now known as AJA4350
kyrylo has quit [Ping timeout: 268 seconds]
kyrylo has joined #ruby
kyrylo has quit [Client Quit]
mossplix has joined #ruby
mre- has joined #ruby
<orbyt_>
Cache_Money Doesn't .generate just create String?
<orbyt_>
I think .open is for creating a file
edwardly has joined #ruby
edwardly has joined #ruby
edwardly has quit [Changing host]
AJA4351 has joined #ruby
Norrin has quit [Quit: ""]
mossplix has quit [Ping timeout: 264 seconds]
mre- has quit [Ping timeout: 268 seconds]
sylario has quit [Quit: Connection closed for inactivity]
AJA4350 has quit [Ping timeout: 264 seconds]
AJA4351 is now known as AJA4350
brool has quit [Ping timeout: 250 seconds]
ElFerna has quit [Quit: Leaving.]
ur5us has joined #ruby
jeremycw has joined #ruby
tsrt^ has joined #ruby
jeremycw has quit [Ping timeout: 268 seconds]
phenom has quit [Quit: See ya! Wouldn't want to blah blah..]
phenom has joined #ruby
<Cache_Money>
orbyt_: This is within a Ruby on Rails application. Here’s the line in my controller that calls the `to_csv` function: send_data @data.to_csv, filename: "DailyRelishGroceryCarts-#{Time.now.strftime("%Y%m%d%H%M%S")}.csv"
AJA4350 has quit [Ping timeout: 240 seconds]
AJA4350 has joined #ruby
eljimmy has quit [Quit: This computer has gone to sleep]
eljimmy has joined #ruby
eljimmy has quit [Client Quit]
eljimmy has joined #ruby
eljimmy has quit [Client Quit]
eljimmy has joined #ruby
eljimmy has quit [Client Quit]
eljimmy has joined #ruby
eljimmy has quit [Client Quit]
eljimmy has joined #ruby
eljimmy has quit [Client Quit]
dviola has quit [Quit: WeeChat 2.6]
Nicmavr has quit [Read error: Connection reset by peer]
cthu| has joined #ruby
Nicmavr has joined #ruby
Cache_Money has quit [Quit: Cache_Money]
<Iambchop>
Cache_Money: if you skip line 19, does the output have the extra blank column?
Cache_Money has joined #ruby
cthulchu_ has quit [Ping timeout: 276 seconds]
jeremycw has joined #ruby
ur5us has quit [Remote host closed the connection]
mdsn has joined #ruby
jeremycw has quit [Ping timeout: 246 seconds]
gix- has joined #ruby
gix has quit [Disconnected by services]
russt has quit [Quit: That's all, folks!]
brendan- has quit [Ping timeout: 245 seconds]
brendan- has joined #ruby
brendan- has quit [Read error: Connection reset by peer]
brendan- has joined #ruby
mdsn has quit [Ping timeout: 245 seconds]
russt has joined #ruby
Jonopoly has quit [Quit: WeeChat 2.5]
AJA4350 has quit [Ping timeout: 240 seconds]
AJA4350 has joined #ruby
matheusm1reira is now known as matheusmoreira
cd has quit [Quit: cd]
mossplix has joined #ruby
gix- has quit [Ping timeout: 265 seconds]
mossplix has quit [Ping timeout: 240 seconds]
Cache_Money has quit [Quit: Cache_Money]
AJA4350 has quit [Remote host closed the connection]
donofrio has quit [Remote host closed the connection]
Cache_Money has joined #ruby
Cache_Money has quit [Client Quit]
jeremycw has joined #ruby
jeremycw has quit [Ping timeout: 240 seconds]
jokester has joined #ruby
Technodrome has joined #ruby
Fira__ has quit [Ping timeout: 246 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tsrt^ has quit [Read error: Connection reset by peer]
poontangmessiah has joined #ruby
jeremycw has joined #ruby
jeremycw has quit [Ping timeout: 252 seconds]
hutch has joined #ruby
madper has joined #ruby
rorschach has joined #ruby
rorschach has quit [Client Quit]
absolutejam2 has quit [Ping timeout: 245 seconds]
lupine has quit [Ping timeout: 245 seconds]
rorschach has joined #ruby
lupine has joined #ruby
hutch has quit [Ping timeout: 264 seconds]
chalkmonster has quit [Quit: WeeChat 2.6]
rorschach is now known as Inoriand
MrCrackPot has quit [Ping timeout: 265 seconds]
hutch has joined #ruby
Inoriand has left #ruby [#ruby]
mossplix has quit [Remote host closed the connection]
xco has joined #ruby
AJA4351 has joined #ruby
MrCrackPot has joined #ruby
AJA4350 has quit [Ping timeout: 240 seconds]
AJA4351 is now known as AJA4350
queip has quit [Ping timeout: 240 seconds]
MinSrodowiska has joined #ruby
freedom has joined #ruby
queip has joined #ruby
Technodrome has joined #ruby
dinfuehr has quit [Ping timeout: 240 seconds]
dinfuehr has joined #ruby
hutch has quit [Ping timeout: 246 seconds]
xco has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
queip has quit [Ping timeout: 240 seconds]
duderonomy has joined #ruby
queip_ has joined #ruby
queip_ is now known as queip
duderonomy has quit [Ping timeout: 268 seconds]
poontangmessiah has quit [Remote host closed the connection]
MinSrodowiska has quit [Quit: Bye Bye]
dasher00 has joined #ruby
schne1der has quit [Ping timeout: 245 seconds]
queip has quit [Ping timeout: 240 seconds]
queip_ has joined #ruby
queip_ is now known as queip
greengriminal has quit [Quit: This computer has gone to sleep]
DTZUZO has joined #ruby
queip_ has joined #ruby
queip has quit [Ping timeout: 240 seconds]
queip_ is now known as queip
ozzloy has quit [Ping timeout: 240 seconds]
jacksoow_ has joined #ruby
AJA4351 has joined #ruby
jacksoow has quit [Ping timeout: 265 seconds]
AJA4350 has quit [Ping timeout: 265 seconds]
AJA4351 is now known as AJA4350
renich has joined #ruby
queip has quit [Ping timeout: 268 seconds]
queip has joined #ruby
yann-kaelig has quit [Quit: yann-kaelig]
drincruz has joined #ruby
queip has quit [Ping timeout: 240 seconds]
queip has joined #ruby
wildtrees has joined #ruby
wildtrees has quit [Max SendQ exceeded]
ellcs has joined #ruby
the_bugyi_man has joined #ruby
the_bugyi_man has left #ruby [#ruby]
wildtrees has joined #ruby
hiroaki has joined #ruby
brool has joined #ruby
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 245 seconds]
AJA4351 is now known as AJA4350
duderonomy has joined #ruby
MrCrackPot has quit [Ping timeout: 265 seconds]
ellcs has quit [Ping timeout: 245 seconds]
Fira__ has quit [Ping timeout: 246 seconds]
Fira__ has joined #ruby
drincruz has quit [Ping timeout: 246 seconds]
chalkmonster has joined #ruby
queip_ has joined #ruby
queip has quit [Ping timeout: 252 seconds]
chalkmonster has quit [Client Quit]
queip_ is now known as queip
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 246 seconds]
AJA4351 is now known as AJA4350
phaul has joined #ruby
orbyt_ has joined #ruby
fuzzface has joined #ruby
sandstrom has joined #ruby
meowzus has joined #ruby
<meowzus>
Hi! If I'm iterating through a file line by line - aka File.open('foo').each { |a_line| } , is there a way to truncate the file after a certain point?
<phaul>
hi meowzus, what do you mean by truncating? Do you want to stop reading when a particular line is reached?
<meowzus>
No, I want to actually truncate the file
<meowzus>
I think I got it though. If assign the file as f = File.open('foo), and then do f.each { |a_line| }
<meowzus>
then I can access f.pos, at a point when I want to truncate the file
<phaul>
Ok. I think you open the file for writing then. because File.open opens it for read only
<phaul>
Yeah if you get a file pos you can use File.truncate
<phaul>
but as the docs state it has to be open for read