postmodern has quit [Remote host closed the connection]
flashpoint9 has joined #ruby
rhg135 has quit [Read error: Connection reset by peer]
flashpoint9 has quit [Remote host closed the connection]
rhg135 has joined #ruby
nando293921 has quit [Ping timeout: 260 seconds]
macsteps has joined #ruby
ruby-lang079 has quit [Ping timeout: 250 seconds]
diegoviola has quit [Quit: WeeChat 1.5]
ICantCook has joined #ruby
treaki__ has joined #ruby
Guest39441 has quit [Read error: Connection reset by peer]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Guest39441 has joined #ruby
Rickmasta has joined #ruby
treaki_ has quit [Ping timeout: 272 seconds]
jsaak has joined #ruby
ur5us has quit [Remote host closed the connection]
Gooer has joined #ruby
yfeldblum has quit [Remote host closed the connection]
gkop has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jsaak has quit [Ping timeout: 250 seconds]
zacts has joined #ruby
nankyokusei has joined #ruby
dminuoso has joined #ruby
flashpoint9 has joined #ruby
tristanp has quit [Ping timeout: 252 seconds]
howdoi has joined #ruby
Gooer has quit [Ping timeout: 240 seconds]
tristanp has joined #ruby
Rickmasta has joined #ruby
hk238 has joined #ruby
Xiti has quit [Quit: Xiti]
nankyokusei has quit [Ping timeout: 240 seconds]
flashpoint9 has quit [Ping timeout: 250 seconds]
dminuoso has quit [Ping timeout: 244 seconds]
gkop has quit [Quit: Lost terminal]
pwnd_nsfw` has joined #ruby
Robtop__ has quit [Ping timeout: 250 seconds]
nerium has quit [Ping timeout: 240 seconds]
p0p0pr37 has joined #ruby
alfiemax has quit [Ping timeout: 252 seconds]
mattwashere has joined #ruby
nando293921 has joined #ruby
gix has quit [Ping timeout: 258 seconds]
macsteps has quit [Remote host closed the connection]
enterprisey has quit [Remote host closed the connection]
macsteps has joined #ruby
anoyeee has joined #ruby
<anoyeee>
yo
armyriad has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
gix has joined #ruby
mattwashere has quit [Ping timeout: 272 seconds]
Rickmasta has joined #ruby
zacts has quit [Ping timeout: 250 seconds]
macsteps has quit [Ping timeout: 260 seconds]
justbleed has joined #ruby
yadobujo has joined #ruby
nando293921 has quit [Ping timeout: 246 seconds]
conta has joined #ruby
_djbkd has joined #ruby
Mirubiri has joined #ruby
drewo has joined #ruby
Guest39441 has quit [Read error: Connection reset by peer]
<shevy>
now I had an idea for a module
<shevy>
given the input argument, say colours
DrCode has quit [Ping timeout: 264 seconds]
tmtwd has joined #ruby
<shevy>
autogenerate: @use_colours; the query method(s) use_colours? and use_colours; and the methods enable_colours() and disable_colours() additionally. so sorta a bit like a more verbose attr_accessor, adding more methods
Guest60828 has quit [Ping timeout: 252 seconds]
HoloIRCUser has joined #ruby
yfeldblum has joined #ruby
Dimik-- has quit []
govg has joined #ruby
xall has quit [Ping timeout: 276 seconds]
cd-rum_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Guest60828 has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Rodya_ has joined #ruby
jphase has quit [Remote host closed the connection]
Axy has quit [Read error: Connection reset by peer]
<shevy>
I am trying to add, by default @colours = true to all from class Bar instantiated objects
dnewkerk has quit [Read error: Connection reset by peer]
<shevy>
hmmm I guess I am in the wrong self
justbleed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Guest60828 has joined #ruby
dnewkerk has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sumobob has quit [Ping timeout: 250 seconds]
dminuoso has joined #ruby
xall has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
ur5us has joined #ruby
dminuoso has quit [Read error: No route to host]
dminuoso has joined #ruby
dminuoso has quit [Client Quit]
dminuoso has joined #ruby
xall has quit [Ping timeout: 246 seconds]
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Rickmasta has joined #ruby
Rodya_ has quit [Remote host closed the connection]
astrobun_ has quit [Remote host closed the connection]
tristanp has quit [Ping timeout: 252 seconds]
alfiemax has joined #ruby
A_Drone has joined #ruby
elifoster has quit [Ping timeout: 276 seconds]
A_Drone has quit [Remote host closed the connection]
jsaak has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mistermocha has joined #ruby
A_Drone has joined #ruby
A_Drone has quit [Client Quit]
tristanp has joined #ruby
mistermocha has quit [Ping timeout: 250 seconds]
alfiemax has quit [Ping timeout: 276 seconds]
moeabdol1 has quit [Ping timeout: 244 seconds]
saneax_AFK is now known as saneax
ericsupreme has quit [Ping timeout: 264 seconds]
cd-rum has joined #ruby
dnewkerk has left #ruby [#ruby]
Cohedrin has joined #ruby
galeido has quit [Quit: leaving]
galeido has joined #ruby
galeido has quit [Changing host]
galeido has joined #ruby
aryaching has quit [Ping timeout: 276 seconds]
LoneHerm_ has joined #ruby
anoyeee has quit [Remote host closed the connection]
alfiemax has joined #ruby
tmtwd has quit [Ping timeout: 250 seconds]
Parko has quit [Quit: In a while, crocodile]
yadobujo has quit [Remote host closed the connection]
arescorpio has quit [Quit: Leaving.]
xall has joined #ruby
postmodern has joined #ruby
elifoster has joined #ruby
EasyCo has joined #ruby
<EasyCo>
Hi team, is there a method kind of like all? where I can iterate through an array of objects and check that an attribute value is the same across all objects?
LoneHerm_ has quit [Remote host closed the connection]
drewo has quit [Ping timeout: 272 seconds]
leea has joined #ruby
<Radar>
EasyCo: .all? { |e| e["key"] == value }
<EasyCo>
Radar, more along the lines of: [obj, obj, obj].each { |previous_object, current_object| previous_object.amount == curent_object.amount }
duncannz has quit [Remote host closed the connection]
Meow-J has quit [Quit: Connection closed for inactivity]
amclain has quit [Quit: Leaving]
aupadhye has quit [Quit: Leaving]
k13nox has joined #ruby
Tachikomas has joined #ruby
Dimik has joined #ruby
ur5us has quit [Remote host closed the connection]
k13nox_ has joined #ruby
k13nox has quit [Read error: Connection reset by peer]
leea has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Guest60828 has quit [Ping timeout: 240 seconds]
blackgoat has quit [Quit: WeeChat 1.5]
aswen has joined #ruby
k13nox_ has quit [Client Quit]
Gooer has joined #ruby
Devalo has quit [Remote host closed the connection]
senayar has joined #ruby
Devalo has joined #ruby
frozengeek has joined #ruby
ICantCook has quit [Ping timeout: 240 seconds]
ICantCook has joined #ruby
hahuang61 has joined #ruby
<frozengeek>
hey all, I am having an issue, I am trying to (programatically) figure out the system-wide gemdir on el7, but "Gem.dir" keeps giving me the user gem dir.
Gooer has quit [Client Quit]
Log1x has joined #ruby
Guest60828 has joined #ruby
dionysus69 has quit [Ping timeout: 246 seconds]
budhram1 has quit [Quit: Leaving.]
jaruga___ has joined #ruby
jackjackdripper has joined #ruby
jsaak has quit [Ping timeout: 240 seconds]
hahuang61 has quit [Ping timeout: 258 seconds]
tristanp has quit [Ping timeout: 252 seconds]
ghr has joined #ruby
Tachikomas has quit [Remote host closed the connection]
frozengeek has quit [Quit: frozengeek]
frozengeek has joined #ruby
Pumukel has joined #ruby
Dimik has quit [Ping timeout: 258 seconds]
workmad3 has joined #ruby
moeabdol1 has joined #ruby
tristanp has joined #ruby
Gooer has joined #ruby
mikecmpb_ has joined #ruby
workmad3_ has joined #ruby
blackgoat has joined #ruby
kedare has joined #ruby
workmad3 has quit [Ping timeout: 258 seconds]
moeabdol1 has quit [Ping timeout: 244 seconds]
mikecmpbll has quit [Ping timeout: 252 seconds]
moeabdol1 has joined #ruby
pawnbox has quit [Remote host closed the connection]
benlieb has joined #ruby
douglascorrea has joined #ruby
drewo has joined #ruby
augcesar has quit [Quit: Connection closed for inactivity]
Devalo has quit [Remote host closed the connection]
Couch has joined #ruby
nanoyak has joined #ruby
douglascorrea has quit [Ping timeout: 250 seconds]
benlieb has quit [Quit: benlieb]
drewo has quit [Ping timeout: 258 seconds]
bigkevmcd has quit [Read error: Connection reset by peer]
bigkevmcd has joined #ruby
cd-rum has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
workmad3_ is now known as workmad3
flashpoint9 has joined #ruby
Gooer has quit [Ping timeout: 240 seconds]
koooge_ has joined #ruby
koooge has joined #ruby
koooge__ has joined #ruby
koooge__ has quit [Client Quit]
koooge has quit [Client Quit]
benlieb has joined #ruby
Coldblackice has quit [Ping timeout: 244 seconds]
flashpoint9 has quit [Ping timeout: 250 seconds]
astrobun_ has quit [Remote host closed the connection]
araujo_ has quit [Quit: Leaving]
Snowy has joined #ruby
tvw has joined #ruby
meatchicken has quit [Ping timeout: 246 seconds]
yfeldblum has quit [Remote host closed the connection]
meatchicken has joined #ruby
yfeldblum has joined #ruby
<frozengeek>
anybody? ^
yfeldblu_ has joined #ruby
yfeldblu_ has quit [Remote host closed the connection]
toretore has joined #ruby
yfeldblu_ has joined #ruby
armyriad has quit [Ping timeout: 250 seconds]
yfeldblum has quit [Ping timeout: 250 seconds]
sdothum has joined #ruby
budhram1 has joined #ruby
zeroDi has joined #ruby
kavanagh has joined #ruby
troulouliou_div2 has joined #ruby
Log1x has quit [Ping timeout: 246 seconds]
DevMagpie has joined #ruby
DevMagpie has quit [Client Quit]
hahuang61 has joined #ruby
elifoster has quit [Ping timeout: 246 seconds]
codecop has joined #ruby
postmodern has quit [Quit: Leaving]
armyriad has joined #ruby
johnny56_ has joined #ruby
johnny56 has quit [Ping timeout: 264 seconds]
pawnbox has joined #ruby
hahuang61 has quit [Ping timeout: 250 seconds]
Guest60828 has quit [Ping timeout: 250 seconds]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
armyriad has quit [Max SendQ exceeded]
jswe has joined #ruby
Guest60828 has joined #ruby
armyriad has joined #ruby
budhram1 has quit [Quit: Leaving.]
armyriad has quit [Max SendQ exceeded]
lxsameer has joined #ruby
drewo has joined #ruby
nanoyak has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
armyriad has joined #ruby
drewo has quit [Ping timeout: 244 seconds]
coffeecupp has joined #ruby
indigomez has joined #ruby
yfeldblu_ has quit [Ping timeout: 250 seconds]
<indigomez>
hi!! When SQLite3::Database.new from scratch, how do I specify a subdirectory from the source file to create the database there rather than in the root folder? Thanks!
mistermocha has joined #ruby
Drakx has quit [Ping timeout: 258 seconds]
nankyokusei has joined #ruby
<jhass>
just do it? pass a path
<indigomez>
jhass: I do not find it in the documentation. Do you mean something like this?: SQLite3::Database.new ('name', path: 'path')?
<jhass>
no
mikecmpb_ has quit [Read error: Connection reset by peer]
<jhass>
just SQLite3::Database.new "foo/bar.db"
<jhass>
or SQLite3::Database.new File.join(__dir__, "foo", "bar.db")
Drakx has joined #ruby
mikecmpbll has joined #ruby
<indigomez>
thanks jhass, this worked: SQLite3::Database.new("db/#{db_name}")
mistermocha has quit [Ping timeout: 250 seconds]
<jhass>
note it's relative to the current working directory, not the current ruby file
<jhass>
oh well
<jhass>
?crosspost indigomez
<ruby[bot]>
indigomez: Please do not crosspost without at least telling so and mentioning provided suggestions and their outcome in all channels. Experience shows that people don't do either, and not doing so is considered rude.
flashpoint9 has joined #ruby
nankyokusei has quit [Ping timeout: 246 seconds]
nixmaniack has joined #ruby
<indigomez>
my apologies and thanks for the lesson
stardiviner has quit [Read error: Connection reset by peer]
c0mrad3 has quit [Quit: Connection closed for inactivity]
neohunter has joined #ruby
stardiviner has joined #ruby
flashpoint9 has quit [Ping timeout: 250 seconds]
roamingdog has joined #ruby
nixmaniack has quit [Read error: Connection reset by peer]
n1x has joined #ruby
Gooer has joined #ruby
roamingdog has quit [Ping timeout: 240 seconds]
n1x has quit [Remote host closed the connection]
flashpoint9 has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
Drakx has quit [Ping timeout: 250 seconds]
Meow-J has joined #ruby
budhram1 has joined #ruby
zacstewart has quit [Ping timeout: 264 seconds]
budhram1 has left #ruby [#ruby]
bkxd has joined #ruby
devyn has joined #ruby
dionysus69 has joined #ruby
last_staff has joined #ruby
yfeldblum has joined #ruby
giz|work has joined #ruby
Drakx has joined #ruby
freerobby has joined #ruby
jswe has quit [Quit: Leaving]
harfangk has joined #ruby
Rickmasta has joined #ruby
kavanagh has quit [Remote host closed the connection]
kavanagh has joined #ruby
alfiemax has quit [Ping timeout: 272 seconds]
alfiemax has joined #ruby
c0mrad3 has joined #ruby
hahuang61 has joined #ruby
workmad3_ has joined #ruby
colegatron_origi has quit [Ping timeout: 250 seconds]
workmad3 has quit [Ping timeout: 276 seconds]
hahuang61 has quit [Ping timeout: 250 seconds]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Log1x has joined #ruby
Log1x has joined #ruby
Log1x has quit [Changing host]
kavanagh has quit [Quit: That's all folks!]
xall has quit [Ping timeout: 272 seconds]
yardenbar has joined #ruby
drewo has joined #ruby
existensil has quit [Ping timeout: 272 seconds]
stardiviner has quit [Ping timeout: 276 seconds]
Wildfyr has joined #ruby
Wildfyr has quit [Changing host]
Wildfyr has joined #ruby
koooge_ has quit [Quit: Leaving...]
drewo has quit [Ping timeout: 258 seconds]
johnmilton has joined #ruby
johnmilton has quit [Remote host closed the connection]
johnmilton has joined #ruby
<Daneel>
drbrain, thank you for your answer yesterday . i'll test on windows
johnmilton has quit [Remote host closed the connection]
xall has joined #ruby
johnmilton has joined #ruby
johnmilton has quit [Remote host closed the connection]
colegatron_origi has joined #ruby
conta has joined #ruby
johnmilton has joined #ruby
tesuji has quit [Read error: Connection reset by peer]
tvw has quit [Read error: Connection reset by peer]
tvw has joined #ruby
existensil has joined #ruby
douglascorrea has joined #ruby
auzty has quit [Quit: Leaving]
johnmilton has quit [Remote host closed the connection]
yfeldblum has quit [Remote host closed the connection]
consti has joined #ruby
yfeldblum has joined #ruby
johnmilton has joined #ruby
johnmilton has quit [Remote host closed the connection]
DrCode has joined #ruby
tristanp has quit [Ping timeout: 252 seconds]
johnmilton has joined #ruby
yqt has joined #ruby
pawnbox_ has joined #ruby
douglascorrea has quit [Ping timeout: 252 seconds]
<Bish>
whats wrong with config.ru what is this run bs
<Bish>
why do i need to invoke the webserver in this weird way, why can't it be
mistermocha has joined #ruby
<Bish>
App.run
johnmilton has quit [Remote host closed the connection]
johnmilton has joined #ruby
Guest60828 has quit [Ping timeout: 252 seconds]
conta has quit [Ping timeout: 244 seconds]
pawnbox has quit [Ping timeout: 276 seconds]
tristanp has joined #ruby
Guest60828 has joined #ruby
roshanavand has quit [Quit: This computer has gone to sleep]
Guest2370 is now known as Tristan-Speccy
blackmesa has quit [Ping timeout: 240 seconds]
mistermocha has quit [Ping timeout: 250 seconds]
Log1x has quit [Ping timeout: 264 seconds]
harfangk has quit [Quit: harfangk]
Ropeney has joined #ruby
pmodin has joined #ruby
modin has quit [Ping timeout: 264 seconds]
pmodin is now known as modin
Ropeney has quit [Client Quit]
Log1x has joined #ruby
whiteline has quit [Read error: Connection reset by peer]
blackmesa has joined #ruby
`tim` has joined #ruby
<darix>
Bish: how do run the config.ru file afterwards?
whiteline has joined #ruby
<shevy>
mighty russian files
rodfersou has joined #ruby
<shevy>
Bish if it helps you, I avoid .ru files :D
Ropeney has joined #ruby
Ropeney has quit [Client Quit]
Ropeney has joined #ruby
<apeiros>
Bish: why don't you read docs? why do you call anything you haven't remotely understood bs? why don't you try to understand ideas behind software?
whiteline has quit [Ping timeout: 240 seconds]
<giz|work>
.ru is opened with your orger
<giz|work>
it can display .ru orgs just fine
`tim` has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
zacstewart has joined #ruby
whiteline has joined #ruby
elepedus has joined #ruby
JeanCarloMachado has joined #ruby
yardenbar has quit [Ping timeout: 264 seconds]
zacstewart has quit [Ping timeout: 264 seconds]
ins64 has joined #ruby
ur5us has joined #ruby
flashpoint9 has quit [Remote host closed the connection]
benlieb has quit [Quit: benlieb]
Xiti has quit [Quit: Xiti]
hipertracker has quit [Quit: hipertracker]
<Bish>
apeiros: well, i have looken into that manner before, when i decided for webmachine
<Bish>
and i knew i hated it
<apeiros>
seems to me you mostly hate it out of ignorance
<Bish>
and today i wanted to look into rack again, and see this config.ru cra
<Bish>
p
<Bish>
nope
<apeiros>
yupp
<Bish>
i just cannot remember
<Bish>
and even the fact that i only find this config stuff
ngw has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
AngryBuzzy has joined #ruby
<Wildfyr>
>> puts 'test
<ruby[bot]>
Wildfyr: # => /tmp/execpad-e2383f8be362/source-e2383f8be362:2: unterminated string meets end of file ...check link for more (https://eval.in/605870)
<ruby[bot]>
Wildfyr: Please use your local irb or pry (see ?pry) to experiment, ruby[bot]'s eval functionality is for demonstration purposes only.
<Bish>
you only got it wrong once tho, gj
blackmesa has quit [Ping timeout: 250 seconds]
<Wildfyr>
fine
<Wildfyr>
?pry
<ruby[bot]>
Pry, the better IRB, provides easy object inspection `ls`, `history`, viewing docs `?`, viewing source `$`, syntax highlighting and other features (see `help` for more). Put `binding.pry` in your source code for easy debugging. Install Pry (https://pryrepl.org/): gem install pry pry-doc
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
<Wildfyr>
okay
hahuang61 has joined #ruby
drewo has joined #ruby
galeido has quit [Quit: leaving]
coffeecupp has quit [Quit: Lost terminal]
JeanCarloMachado has quit [Ping timeout: 240 seconds]
akitada has quit [Quit: Connection closed for inactivity]
Ishido has joined #ruby
synthroi_ has joined #ruby
kedare has quit [Quit: Leaving]
tvw has joined #ruby
LoneHerm_ has joined #ruby
yqt has quit [Ping timeout: 250 seconds]
stardiviner has joined #ruby
King_DuckZ has joined #ruby
synthroid has quit [Ping timeout: 244 seconds]
<King_DuckZ>
hi, what's the best way for a script to call itself recursively with a different working dir? I'm thinking to do Dir.chdir(blah){|p| Kernel.system(__FILE__)}
omphe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<King_DuckZ>
but what if the user didn't invoke my script directly? ie: instead of ./my_script he did ruby my_script
ruby-lang364 has joined #ruby
<ruby-lang364>
hi anyone here
omphe has joined #ruby
<ruby-lang364>
I have a question
<ruby-lang364>
Anyone here can tell me?
omphe has quit [Client Quit]
xall has quit [Ping timeout: 244 seconds]
<King_DuckZ>
ruby-lang364: you have a question.
<King_DuckZ>
!next
LoneHerm_ has quit [Remote host closed the connection]
<shevy>
lol
mistermocha has joined #ruby
omphe has joined #ruby
ljc has joined #ruby
<shevy>
King_DuckZ you have two parameters
<ruby-lang364>
actually am doing this in my controller
<apeiros>
King_DuckZ: whether you invoke a script via ./foo or ruby ./foo does not change the working dir
<ruby-lang364>
is there anyway to convert it with adding something aftering doing strftime?
<jhass>
King_DuckZ: just make sure your toplevel code is like one line of code, MyApp::CLI.new(ARGV), then you can just call it inside Dir.chdir or not
<King_DuckZ>
apeiros: I know, I've put the Dir.chdir block for that, but if some user has ruby in a strange place and the shebang line doesn't work, then the way I invoke it does make a difference
<ruby-lang364>
any way to do that?
mistermocha has quit [Ping timeout: 250 seconds]
<King_DuckZ>
jhass: I see, nice idea
Ishido has quit [Ping timeout: 260 seconds]
tristanp has quit [Ping timeout: 246 seconds]
ruby-lang364 has quit [Quit: Page closed]
blackmesa has joined #ruby
hipertracker has quit [Quit: hipertracker]
zacstewart has joined #ruby
nixmaniack has joined #ruby
M-mistake has quit [Remote host closed the connection]
M-Kodo has quit [Remote host closed the connection]
M-shine has quit [Remote host closed the connection]
mdw_ has joined #ruby
umdstu has joined #ruby
drewo has joined #ruby
mdw has quit [Ping timeout: 276 seconds]
malconis has joined #ruby
nixmaniack has quit [Remote host closed the connection]
ngw has joined #ruby
tristanp has joined #ruby
drewo has quit [Ping timeout: 250 seconds]
deadnull has joined #ruby
hahuang61 has joined #ruby
erik_paperik has joined #ruby
alfiemax has quit [Ping timeout: 252 seconds]
jschoolcraft has joined #ruby
flashpoint9 has joined #ruby
erik_paperik_ has joined #ruby
aswen has joined #ruby
erik_paperik_ has quit [Remote host closed the connection]
erik_paperik has quit [Remote host closed the connection]
lacce has joined #ruby
hahuang61 has quit [Ping timeout: 250 seconds]
AngryBuzzy has quit [Quit: This computer has gone to sleep]
M-shine has joined #ruby
blackgoat has quit [Ping timeout: 260 seconds]
indigomez has joined #ruby
tvw has quit [Read error: Connection reset by peer]
swills has quit [Ping timeout: 258 seconds]
raeoks has quit [Remote host closed the connection]
hipertracker has joined #ruby
pawnbox has joined #ruby
aupadhye has joined #ruby
ponga has joined #ruby
pawnbox has quit [Remote host closed the connection]
AngryBuzzy has joined #ruby
pawnbox has joined #ruby
Madplatypus has quit [Quit: Connection closed for inactivity]
dvinciguerra_ has joined #ruby
AngryBuzzy has quit [Quit: This computer has gone to sleep]
Snowy has quit [Read error: Connection reset by peer]
Snowy has joined #ruby
AlexRussia has joined #ruby
<apeiros>
gregf_: assumes the values are only \w+
codecop has quit [Remote host closed the connection]
nerium has joined #ruby
mistermocha has joined #ruby
nankyokusei has joined #ruby
<apeiros>
I *think* the correct solution with scan would be .scan(/[^\s,](?:(?!\s*(?:,|\z)).)*/)
<apeiros>
but that's already quite a bit more complex and brittle. so there I'd actually prefer split+map+strip :)
flashpoint9 has joined #ruby
Xiti has joined #ruby
<kaleido>
regex is expensive anyways, isnt it?
flughafen_ has joined #ruby
<apeiros>
as a blanket statement, no
<apeiros>
there's plenty of cases where even a complex regex is less expensive than say ruby's method call overhead.
mistermocha has quit [Ping timeout: 250 seconds]
nankyokusei has quit [Ping timeout: 276 seconds]
mattwashere has joined #ruby
<kaleido>
interesting. its still painful to look at :)
Rodya_ has joined #ruby
tristanp has quit [Ping timeout: 252 seconds]
JeanCarloMachado has quit [Remote host closed the connection]
JeanCarloMachado has joined #ruby
alfiemax has joined #ruby
exadeci has quit [Quit: Connection closed for inactivity]
ngw has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
TheHodge has joined #ruby
cdg has joined #ruby
roamingdog has joined #ruby
diegoviola has joined #ruby
nadir has joined #ruby
augcesar has joined #ruby
M-mistake has joined #ruby
ngw has joined #ruby
tristanp has joined #ruby
catphish has joined #ruby
<gregf_>
apeiros: ah - sure ;)
<catphish>
i'm trying to track down a memory leak, i'm using "ObjectSpace.dump_all" but the sum of the "bytesize" in the output doesn't seem close to my process's actual resident size? am i missing something obvious?
drewo has joined #ruby
cdg has quit [Remote host closed the connection]
gduine has joined #ruby
<catphish>
i wasn't expecting an exact match, but the rss is about 15x larger than the objects reported
fmcgeough has joined #ruby
drewo has quit [Ping timeout: 258 seconds]
swills has joined #ruby
Dysp has joined #ruby
gomix has joined #ruby
<Dysp>
Mjello. I am writing some plugins that are to be used in rails by my friend. I am trying to expand on some basic classes, like adding a sum method to Array. But if my friend passes strings, obviously the code will break. How should I approach this and handle the error? Should I use the built in error class or is that ill-adviced? Should I build my own error-kind class to communicate to him what he is doing wrong?
SilverKey has joined #ruby
johnny56_ has quit [Ping timeout: 264 seconds]
<Papierkorb>
Dysp: Rails uses ActiveSupport which already adds #sum to Enumerable and thus Array
<Dysp>
That was not my question :)
<Dysp>
And I know. But a part of me learning how to program is to do things myself from the beginning.
<Dysp>
Then when the day arrives when I have to implement more advanced stuff than "sum", I have already learnt how to test, code and implement such methods.
<Papierkorb>
for rails specific questions ask in #RubyOnRails
Rodya_ has quit [Remote host closed the connection]
<Dysp>
It is not a rails question.
<Papierkorb>
Why are you talking about rails plugins and #sum then?
<Dysp>
I am talking about coding a plugin that has zero to do with Rails.
<Dysp>
That it is going to be used in Rails is not of any importance; I just added the information because it sometimes help to clarify context.
JeanCarloMachado has quit [Ping timeout: 276 seconds]
HoloIRCUser has quit [Remote host closed the connection]
anisha_ has quit [Quit: This computer has gone to sleep]
roamingdog has quit []
hahuang61 has joined #ruby
benlieb has joined #ruby
marahin is now known as fr33bot
fr33bot is now known as marahin
marahin is now known as fr33bot
fr33bot is now known as kasia
mikecmpbll has joined #ruby
SilverKey has quit [Quit: Halted.]
kasia is now known as fr33bot
eljimmy has joined #ruby
memorasus has quit [Ping timeout: 252 seconds]
bodgix has joined #ruby
mikecmpb_ has quit [Ping timeout: 240 seconds]
nerium has quit [Ping timeout: 272 seconds]
JeanCarloMachado has joined #ruby
naftilos76 has joined #ruby
hahuang61 has quit [Ping timeout: 250 seconds]
Mia has quit [Read error: Connection reset by peer]
Rodya_ has joined #ruby
Mia has joined #ruby
blackmesa has quit [Ping timeout: 264 seconds]
dionysus69 has quit [Ping timeout: 240 seconds]
<bodgix>
hello all. I'm struggling with a trivial problem. I want to write a long regexp in multiple lines. but I don't know why it's not matching when I write it in multiple lines with %r{}xm it works if I write it in a single line using //m : https://gist.github.com/anonymous/6ac84c4b016b9060153351ec205894c3
JeanCarloMachado has quit [Ping timeout: 272 seconds]
tvon has quit [Quit: System is sleeping...]
yqt has joined #ruby
Mia has quit [Read error: Connection reset by peer]
mgiagante has joined #ruby
spiette has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
<apeiros>
bodgix: yeah, um, can you like paste readable code instead of your irb session?
craigp has quit [Ping timeout: 258 seconds]
yadobujo has quit [Remote host closed the connection]
Daneel has quit [Quit: Quitte]
saneax is now known as saneax_AFK
llua has joined #ruby
johnny56_ has joined #ruby
nevynxxx has quit [Remote host closed the connection]
craigp has joined #ruby
mrbignum has quit []
codecop has joined #ruby
craigp has quit [Ping timeout: 244 seconds]
diegoviola has quit [Quit: WeeChat 1.5]
flashpoint9 has quit [Remote host closed the connection]
ngw has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<kaleido>
or maybe req['Cookie'] = "long random string"
tommylom1ykins is now known as tommylommykins
Rodya_ has joined #ruby
blackmesa has joined #ruby
aryaching has quit [Remote host closed the connection]
Guest60828 has quit [Ping timeout: 244 seconds]
hahuang61 has quit [Ping timeout: 250 seconds]
Guest60828 has joined #ruby
gduine has quit [Ping timeout: 276 seconds]
Log1x has quit [Ping timeout: 250 seconds]
craigp has joined #ruby
ntt has joined #ruby
aryaching has joined #ruby
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ntt>
Hi, I'm trying to launch a ruby script from crontab. In the script there is IPTABLES="sudo /sbin/iptables". If I try to launch the script from the console all works but if I try lo use crontab the iptables part doesn't works. Someone can help me please? I'm using ruby 1.8.7 with rvm
hmdkny has joined #ruby
banisterfiend has joined #ruby
<imperator>
kaleido, get = Net::HTTP::Get.new(uri); get.add_field(key, value)
shinnya has joined #ruby
<imperator>
but personally i would just use rest-client, or some other http lib
frozengeek has quit [Quit: frozengeek]
TheodoreBe has joined #ruby
blackmesa has quit [Ping timeout: 272 seconds]
jaruga___ has quit [Quit: jaruga___]
deadnull has quit [Quit: Bye]
ferr has quit [Ping timeout: 240 seconds]
zeroDi has quit [Quit: WeeChat 1.5]
mgiagante has quit [Quit: Leaving]
mattwashere has quit [Remote host closed the connection]
yardenbar has joined #ruby
mattwashere has joined #ruby
Vingador has joined #ruby
bmurt has joined #ruby
mattwashere has quit [Ping timeout: 272 seconds]
Snowy has quit [Remote host closed the connection]
mistermocha has quit [Remote host closed the connection]
dvinciguerra_ has quit [Ping timeout: 244 seconds]
<bodgix>
ah got you
<bodgix>
of course. thanks apeiros
<bodgix>
when I remove x it doesn't work because of \n I presume though
hmdkny has quit [Ping timeout: 246 seconds]
dionysus69 has joined #ruby
mistermocha has quit [Ping timeout: 250 seconds]
crameth has joined #ruby
nankyokusei has joined #ruby
yerek has joined #ruby
LoneHerm_ has joined #ruby
dvinciguerra_ has joined #ruby
davedev24 has joined #ruby
cxybeb has joined #ruby
yerek has quit []
fr33bot is now known as marahin
cschnei__ has joined #ruby
drewo has joined #ruby
Rodya_ has quit [Remote host closed the connection]
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
amclain has joined #ruby
renderful has joined #ruby
nankyokusei has quit [Ping timeout: 244 seconds]
JeanCarloMachado has quit [Ping timeout: 258 seconds]
freerobby has quit [Quit: Leaving.]
eljimmy has quit [Quit: This computer has gone to sleep]
freerobby has joined #ruby
polishdub has joined #ruby
drewo has quit [Ping timeout: 240 seconds]
JeanCarloMachado has joined #ruby
<silverdust>
Thanks kaleido , imperator . That gives me a 400 bad request. I'll look into rest-client
<silverdust>
With curl and postman I get a proper response
eljimmy has joined #ruby
kedare has quit [Quit: Leaving]
mikecmpbll has quit [Ping timeout: 250 seconds]
JakFrist has joined #ruby
yardenbar has quit [Ping timeout: 244 seconds]
SilverKey has quit [Quit: Halted.]
mattwashere has joined #ruby
vdamewood has quit [Quit: Life beckons.]
Vingador has quit [Remote host closed the connection]
otherj has joined #ruby
harfangk has quit [Quit: harfangk]
Log1x has joined #ruby
Log1x has quit [Changing host]
Log1x has joined #ruby
Es0teric has quit [Remote host closed the connection]
<jhass>
bodgix: if you want . to match \n add /m
TheodoreBe has quit [Quit: I have gone to sleep. ZZZzzz…]
freerobby has quit [Quit: Leaving.]
mistermocha has joined #ruby
yqt has quit [Ping timeout: 272 seconds]
jsaak has quit [Ping timeout: 246 seconds]
Log1x has quit [Ping timeout: 264 seconds]
macsteps has joined #ruby
mistermocha has quit [Ping timeout: 272 seconds]
dvinciguerra_ has quit [Ping timeout: 240 seconds]
moeabdol1 has quit [Read error: Connection reset by peer]
mistermocha has joined #ruby
dvinciguerra_ has joined #ruby
moeabdol1 has joined #ruby
xlegoman has joined #ruby
Cohedrin has joined #ruby
ramfjord has joined #ruby
macsteps has quit [Remote host closed the connection]
<neohunter>
What could be the reeason for passanger not picking up the right ruby version when using as apache module?
<neohunter>
I've a PassengerRuby with the right version, but is using the default one
flashpoint9 has quit [Remote host closed the connection]
agent_white has joined #ruby
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
elaptics is now known as elaptics`away
brucebag has joined #ruby
AngryBuzzy has joined #ruby
<ntt>
Hi, I'm trying to launch a ruby script from crontab. In the script there is IPTABLES="sudo /sbin/iptables". If I try to launch the script from the console all works but if I try lo use crontab the iptables part doesn't works. Someone can help me please? I'm using ruby 1.8.7 with rvm. I think it is a permission problem with the command iptables
matp has joined #ruby
<agent_white>
Mornin'
tristanp has quit [Ping timeout: 246 seconds]
Silthias has quit [Ping timeout: 240 seconds]
`tim` has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dvinciguerra_ has quit [Ping timeout: 246 seconds]
<jhass>
ntt: I doubt your OS tells you "doesn't work" as error message
Zackio has quit [Ping timeout: 240 seconds]
aupadhye|food is now known as aupadhye
JakFrist has joined #ruby
crameth has quit [Quit: crameth]
Log1x has joined #ruby
nixmaniack has joined #ruby
SilverKey has joined #ruby
<ntt>
jhass: in the script there is a part where I read the iptables status. If I execute the script from the console variables are correctly filled. If I execute the script from crontab variables are empty. I have something similar to v = (%x[#{IPTABLES} -t mangle -vnx -L '_AUTH_IN_...... )
tristanp has joined #ruby
hahuang61 has joined #ruby
<ntt>
where IPTABLES="sudo /sbin/iptables"
flashpoint9 has joined #ruby
<ntt>
obviously the user that runs the script has permission for sudo without password
DoubleMalt has quit [Remote host closed the connection]
bluOxigen has quit [Ping timeout: 276 seconds]
anisha has joined #ruby
eljimmy has quit [Quit: This computer has gone to sleep]
harfangk has quit [Quit: harfangk]
dvinciguerra_ has joined #ruby
_djbkd has joined #ruby
benlieb has quit [Quit: benlieb]
moeabdol1 has quit [Ping timeout: 276 seconds]
eljimmy has joined #ruby
nixmaniack has quit [Read error: Connection reset by peer]
<ntt>
jhass: I think the problem is crontab. Created a crontab row = */1 * * * * /bin/bash -c -l 'sudo touch /var/www/html/test_cron' <--- This cronjob is executed with the user "cloud-user". It has sudo permission without insert the password. If I try from bash, I can create the file test_cron without insert the password. If I launch from crontab this doesn't work
jrafanie has joined #ruby
nixmaniack has joined #ruby
mistermo_ has quit [Ping timeout: 250 seconds]
<jhass>
time to ask your OS'es help channel then
nixmaniack has quit [Client Quit]
Ishido has joined #ruby
freerobby1 has joined #ruby
Terens1 has joined #ruby
<Terens1>
hello
<Terens1>
what is more suited for ioctl commands? map with c code or use bindata to match structs etc
LoneHerm_ has quit [Remote host closed the connection]
troulouliou_div2 has quit [Quit: Leaving]
otherj has quit [Quit: .]
<Papierkorb>
Terens1: I'd try with the ffi gem first, and if I don't get it to work that way, resort to C code
leea has joined #ruby
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jsaak has joined #ruby
benlieb has joined #ruby
King_DuckZ has left #ruby [#ruby]
tristanp has joined #ruby
mattwashere has quit [Remote host closed the connection]
jonee has joined #ruby
mattwashere has joined #ruby
blaxter has quit [Quit: foo]
doodlehaus has joined #ruby
doodlehaus was kicked from #ruby by ruby[bot] [was banned before]
Rodya_ has joined #ruby
harfangk has joined #ruby
SilverKey has quit [Quit: Halted.]
syngular1ty has quit [Remote host closed the connection]
Guest21 has joined #ruby
<Guest21>
Hi, is there any way i can dynamically change a model's table_name ? Currently I have defined a block, but it is calculated only once and then cached indefinately.
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Ishido has quit [Remote host closed the connection]
<Papierkorb>
Guest21: what is that model? An ORM model? Something else?
<Guest21>
An ActiveRecord::Base model, yes
AndrewIsHere has joined #ruby
<Papierkorb>
Guest21: try asking in #RubyOnRails
maikowblue has joined #ruby
<Guest21>
oh I apologise
mattwashere has quit [Ping timeout: 260 seconds]
tristanp_ has joined #ruby
<Papierkorb>
no problem
tristanp has quit [Read error: Connection reset by peer]
mattwashere has joined #ruby
iamvery has joined #ruby
jishankai has quit [Ping timeout: 258 seconds]
Ebok has joined #ruby
dvinciguerra_ has quit [Ping timeout: 264 seconds]
Coldblackice has joined #ruby
firstdayonthejob has joined #ruby
Guest21 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros>
time to add a "?whatareyoutalkingabout"? :)
<apeiros>
(how the hell do I shorten that?)
Guest60828 has quit [Ping timeout: 272 seconds]
<drbrain>
apeiros: o_O
kies has quit [Ping timeout: 258 seconds]
hahuang61 has joined #ruby
Guest21 has joined #ruby
chip_ has quit [Ping timeout: 240 seconds]
anisha has quit [Quit: This computer has gone to sleep]
dvinciguerra_ has joined #ruby
TheodoreBe has joined #ruby
Guest60828 has joined #ruby
dgynn has joined #ruby
hipertracker has quit [Quit: hipertracker]
Rodya_ has quit [Remote host closed the connection]
troulouliou_div2 has joined #ruby
Rodya_ has joined #ruby
TheodoreBe has quit [Max SendQ exceeded]
hahuang65 has joined #ruby
_djbkd has quit [Remote host closed the connection]
craigp has joined #ruby
SilverKey has joined #ruby
hahuang61 has quit [Ping timeout: 250 seconds]
Guest21 has quit [Client Quit]
JeanCarloMachado has quit [Remote host closed the connection]
JeanCarloMachado has joined #ruby
_djbkd has joined #ruby
blackmesa has joined #ruby
Ebok has quit [Quit: This computer has gone to sleep]
SilverKey has quit [Client Quit]
SilverKey has joined #ruby
whathappens has joined #ruby
<leea>
"?wut"
TheodoreBe has joined #ruby
tristanp_ has quit [Ping timeout: 252 seconds]
blackmesa has quit [Ping timeout: 240 seconds]
troulouliou_div2 has quit [Quit: Leaving]
hipertracker has joined #ruby
tristanp has joined #ruby
LuckyABA has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Ebok has joined #ruby
bronson has joined #ruby
craigp has quit [Ping timeout: 250 seconds]
DoubleMalt has joined #ruby
theery has joined #ruby
pawnbox_ has joined #ruby
freerobby has joined #ruby
pawnbox has quit [Ping timeout: 240 seconds]
napear has joined #ruby
firstdayonthejob has quit [Quit: WeeChat 1.5]
LuckyABA has joined #ruby
freerobby1 has quit [Ping timeout: 272 seconds]
pontiki has joined #ruby
<apeiros>
leea: heh, yeah
<apeiros>
drbrain: as in "please elaborate your context - what framework, tool, etc. are you talking about? if it is rails, then please join #rubyonrails"
firstdayonthejob has joined #ruby
nankyokusei has joined #ruby
hipertracker has quit [Quit: hipertracker]
mistermo_ has joined #ruby
tvon has quit [Quit: System is sleeping...]
replay has joined #ruby
freerobby has quit [Ping timeout: 260 seconds]
hipertracker has joined #ruby
nerium has quit [Ping timeout: 252 seconds]
codecop has joined #ruby
nankyokusei has quit [Ping timeout: 246 seconds]
JeanCarloMachado has quit [Ping timeout: 240 seconds]
mistermo_ has quit [Ping timeout: 250 seconds]
johnmilton has joined #ruby
theery has quit []
JeanCarloMachado has joined #ruby
blackmesa has joined #ruby
LoneHerm_ has joined #ruby
_djbkd has quit [Remote host closed the connection]
johnmilton has quit [Ping timeout: 276 seconds]
kirun has joined #ruby
_djbkd has joined #ruby
cxybeb has quit [Remote host closed the connection]
erlend has quit [Read error: Connection reset by peer]
<jhass>
?context
<ruby[bot]>
Please add more context to your question, what are you doing, why are you doing it, which libraries are involved. Post some code to gist if it clarifies your question.
mdw has quit [Quit: Sleeping Zzzzz]
<jhass>
?
chip_ has joined #ruby
LoneHerm_ has quit [Ping timeout: 272 seconds]
miqlas-H has quit [Ping timeout: 276 seconds]
_djbkd has quit [Ping timeout: 246 seconds]
whathappens has quit [Remote host closed the connection]
erlend has joined #ruby
mikecmpbll has joined #ruby
whathappens has joined #ruby
kavanagh has quit [Quit: That's all folks!]
alfiemax has quit [Ping timeout: 276 seconds]
elifoster has joined #ruby
erlend has quit [Read error: Connection reset by peer]
crystal77 has joined #ruby
whathappens has quit [Ping timeout: 240 seconds]
harfangk has quit [Quit: harfangk]
kiyote23_ has joined #ruby
benlieb has quit [Quit: benlieb]
johnmilton has joined #ruby
benlieb has joined #ruby
benlieb has quit [Client Quit]
mattwashere has quit [Remote host closed the connection]
mattwashere has joined #ruby
erlend has joined #ruby
kiyote23 has quit [Ping timeout: 250 seconds]
whathapp_ has joined #ruby
_djbkd has joined #ruby
flughafen_ has quit [Ping timeout: 240 seconds]
kiyote23_ has quit [Ping timeout: 240 seconds]
whathapp_ has quit [Read error: Connection reset by peer]
whathappens has joined #ruby
napear has left #ruby [#ruby]
tristanp_ has joined #ruby
tristanp has quit [Ping timeout: 252 seconds]
mattwashere has quit [Ping timeout: 250 seconds]
leea has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sai has quit [Remote host closed the connection]
Rodya_ has quit [Remote host closed the connection]
pontiki has quit [Quit: "Poets have been mysteriously silent on the subject of cheese." -- G.K.Chesterson]
Rodya_ has quit [Remote host closed the connection]
mikecmpbll has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
xall has joined #ruby
tristanp has joined #ruby
chip_ has quit [Ping timeout: 250 seconds]
drewo has quit [Quit: WeeChat 1.4]
hck89 has joined #ruby
TheSpiderPig has joined #ruby
Rodya_ has joined #ruby
drewo has joined #ruby
Guest60828 has joined #ruby
AngryBuzzy has joined #ruby
ins64 has quit [Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org]
nerium has joined #ruby
mikecmpbll has joined #ruby
Xiti has quit [Quit: Xiti]
ntt has quit [Ping timeout: 246 seconds]
whathapp_ has joined #ruby
Rodya_ has quit [Remote host closed the connection]
bronson has quit [Remote host closed the connection]
whathappens has quit [Ping timeout: 252 seconds]
symm- has joined #ruby
TheSpiderPig has left #ruby ["Leaving"]
dennisvennink has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
eljimmy has quit [Quit: This computer has gone to sleep]
craigp has joined #ruby
nankyokusei has joined #ruby
Rodya_ has joined #ruby
AngryBuzzy has quit [Quit: This computer has gone to sleep]
naftilos76 has quit [Remote host closed the connection]
Gooer has joined #ruby
craigp has quit [Ping timeout: 240 seconds]
shinnya has quit [Ping timeout: 260 seconds]
nankyokusei has quit [Ping timeout: 272 seconds]
howdoi has quit [Quit: Connection closed for inactivity]
<kaleido>
>> a = b ; b = a ; p a + b
<ruby[bot]>
kaleido: # => undefined local variable or method `b' for main:Object ...check link for more (https://eval.in/606089)
Rodya_ has quit [Ping timeout: 250 seconds]
<bougyman>
/41
flughafen_ has quit [Ping timeout: 260 seconds]
omphe has joined #ruby
kiyote23 has joined #ruby
dminuoso has quit [Ping timeout: 240 seconds]
kies has joined #ruby
ekinmur has joined #ruby
l4v2 has joined #ruby
eizua has quit [Quit: Leaving]
JeanCarloMachado has quit [Ping timeout: 240 seconds]
alexherbo2 has joined #ruby
mrBen2k2k2k has quit [Max SendQ exceeded]
M-Kodo is now known as f1uffyp00ny
sergey_makagon has joined #ruby
<l4v2>
how do I get a discription of what a method does when I run “string”.method in irb?
hipertracker has quit [Quit: hipertracker]
mistermocha has quit [Remote host closed the connection]
ramfjord has quit [Ping timeout: 240 seconds]
<jhass>
irb doesn't support that, use ri or pry
tvon has joined #ruby
<jhass>
?pry
<ruby[bot]>
Pry, the better IRB, provides easy object inspection `ls`, `history`, viewing docs `?`, viewing source `$`, syntax highlighting and other features (see `help` for more). Put `binding.pry` in your source code for easy debugging. Install Pry (https://pryrepl.org/): gem install pry pry-doc
bronson has joined #ruby
mistermocha has joined #ruby
hipertracker has joined #ruby
hipertracker has quit [Client Quit]
tristanp has quit [Ping timeout: 252 seconds]
<l4v2>
what about rails console? same thing then
<jhass>
there's a pry-rails
govg has quit [Ping timeout: 258 seconds]
moeabdol1 has joined #ruby
ekinmur has quit [Client Quit]
f1uffyp00ny is now known as Moneristo
<l4v2>
Rails console doesn’t give info on the method either then right
<jhass>
it's irb by default unless you replace it with pry
yfeldblum has joined #ruby
ramfjord has joined #ruby
<kaleido>
pry makes me smile inside
moeabdol2 has joined #ruby
AndrewIsHere has quit []
kiyote23 has quit []
mistermocha has quit [Ping timeout: 260 seconds]
drewo has quit [Quit: WeeChat 1.4]
drewo has joined #ruby
moeabdol1 has quit [Ping timeout: 244 seconds]
tvon has quit [Quit: Peace out, y'all!]
TheodoreBe has quit [Quit: I have gone to sleep. ZZZzzz…]
hackerdude has joined #ruby
tristanp has joined #ruby
eljimmy has joined #ruby
LoneHermit has joined #ruby
l4v2 has quit [Quit: l4v2]
spudowiar has joined #ruby
zacts has joined #ruby
ramfjord has quit [Ping timeout: 244 seconds]
dopamean_ has joined #ruby
omphe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
LoneHermit has quit [Ping timeout: 276 seconds]
Dimik has joined #ruby
jackjackdripper has joined #ruby
jackjackdripper has quit [Read error: Connection reset by peer]
jackjackdripper1 has joined #ruby
jackjackdripper has joined #ruby
jackjackdripper1 has quit [Read error: Connection reset by peer]
jackjackdripper has quit [Read error: Connection reset by peer]
freerobby has joined #ruby
jackjackdripper has joined #ruby
jackjackdripper has quit [Read error: Connection reset by peer]
jackjackdripper1 has joined #ruby
jackjackdripper has joined #ruby
jackjackdripper1 has quit [Read error: Connection reset by peer]
govg has joined #ruby
jackjackdripper has quit [Read error: Connection reset by peer]
jackjackdripper1 has joined #ruby
maloik has quit [Remote host closed the connection]
jackjackdripper1 has quit [Read error: Connection reset by peer]
jackjackdripper has joined #ruby
maloik has joined #ruby
jackjackdripper has quit [Read error: Connection reset by peer]
jackjackdripper1 has joined #ruby
jackjackdripper1 has quit [Read error: Connection reset by peer]
jackjackdripper has joined #ruby
isberg has joined #ruby
colegatron_origi has quit [Ping timeout: 240 seconds]
gregf has joined #ruby
preyalone has quit [Quit: Connection closed for inactivity]
jackjackdripper has quit [Client Quit]
jackjackdripper has joined #ruby
dionysus69 has quit [Quit: dionysus69]
mib_mib has joined #ruby
<mib_mib>
does [1,2,3,4].collect.with_index iterate the array only one time? or twice for both enumerators?
vF3hNGxc47h8 has joined #ruby
<jhass>
only once
<mib_mib>
also, does this differ from say [1,2,3,4].collect {|x| [x,x]}.select {|x,y| x} which does iterate twice correct?
<jhass>
yes
<mib_mib>
but could in fact iterate once no?
Guest60828 has quit [Ping timeout: 244 seconds]
<jhass>
yes, with some (internal) trickery. That's what #lazy / Enumerator::Lazy does
postmodern has joined #ruby
sai has joined #ruby
<funrep>
hi, how do i define a variable in my controller so that its available in code blocks in the view? (rails 5.0)
<mib_mib>
is there a way to convert the second one to only iterate once easily? (without rewriting it to an 'each' statement)
<jhass>
?rails funrep
<ruby[bot]>
funrep: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<mib_mib>
using lazy
<jhass>
sure just call lazy
<jhass>
see the docs for it
mattwashere has joined #ruby
polishdub has quit [Ping timeout: 264 seconds]
dionysus69 has joined #ruby
Rodya_ has joined #ruby
Ebok has quit [Quit: This computer has gone to sleep]
_djbkd has quit [Remote host closed the connection]
Guest60828 has joined #ruby
hipertracker has joined #ruby
hakunin has quit []
colegatron_origi has joined #ruby
dennisvennink has joined #ruby
troulouliou_div2 has joined #ruby
troulouliou_div2 has quit [Max SendQ exceeded]
nanoyak has joined #ruby
Rodya_ has quit [Remote host closed the connection]
troulouliou_div2 has joined #ruby
nando293921 has joined #ruby
omphe has joined #ruby
tristanp has quit [Ping timeout: 252 seconds]
hahuang61 has joined #ruby
solars has quit [Ping timeout: 240 seconds]
flashpoint9 has quit [Remote host closed the connection]
nando293921 has quit [Ping timeout: 276 seconds]
Rodya_ has joined #ruby
hahuang61 has quit [Ping timeout: 252 seconds]
l4v2 has joined #ruby
andikr has quit [Remote host closed the connection]
tristanp_ has joined #ruby
eqt has joined #ruby
Xiti has joined #ruby
dionysus70 has joined #ruby
umdstu has quit [Quit: umdstu]
dionysus69 has quit [Ping timeout: 246 seconds]
symm- has quit [Ping timeout: 246 seconds]
dionysus70 is now known as dionysus69
Rodya_ has quit [Ping timeout: 240 seconds]
flashpoint9 has joined #ruby
jonee has quit [Quit: ChatZilla 0.9.92 [Firefox 47.0/20160606114208]]
craigp has joined #ruby
mikecmpbll has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mikecmpbll has joined #ruby
mib_mib has quit [Ping timeout: 250 seconds]
vF3hNGxc47h8 has quit [Ping timeout: 264 seconds]
dminuoso has joined #ruby
craigp has quit [Ping timeout: 240 seconds]
Hounddog has quit [Ping timeout: 258 seconds]
blackgoat has joined #ruby
solars has joined #ruby
ramfjord has joined #ruby
replay has quit [Ping timeout: 260 seconds]
mistermocha has joined #ruby
SilverKey has quit [Quit: Halted.]
bronson has quit [Remote host closed the connection]
roma1 has joined #ruby
eqt has quit [Ping timeout: 250 seconds]
TheodoreBe has joined #ruby
dminuoso has quit [Ping timeout: 244 seconds]
flughafen_ has joined #ruby
mistermocha has quit [Ping timeout: 250 seconds]
crystal77 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ramfjord has quit [Ping timeout: 240 seconds]
mistermocha has joined #ruby
ghr has quit [Ping timeout: 240 seconds]
Ishido has joined #ruby
omphe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<yuung>
i have a large csv file (~1 million lines) that i need to parse and transform with ruby. i don't want to read all of it into memory at once; rather i'd like to stream it. my question is, is there a method in IO that lets me read line-by-line, garbage collecting each old line after its been processed?
<zacts>
This is FreeBSD-11 BETA1 btw
<zacts>
:-)
<jhass>
yuung: CSV.foreach should do that already
tristanp has joined #ruby
asianMike has joined #ruby
<yuung>
jhass, cool - is it guaranteed to gc line by line?
<jhass>
no
ghr has quit [Ping timeout: 240 seconds]
craigp has joined #ruby
<jhass>
invoking the gc after each line would be way too slow
yourname2 has joined #ruby
<yuung>
jhass i see; maybe not line by line, but in the end i don't want to read the whole file into memory at once. does CSV::foreach do that?
<jhass>
it only reads one line at a time and discards the reference to the previous one at the same time
<yuung>
jhass ah okay
<yuung>
that makes more sense :)
yourname2 has quit [Client Quit]
<jhass>
yuung: you already asked that, I wouldn't recommend you the method if it wouldn't
Gooer has quit [Quit: Gooer]
tristanp_ has quit [Ping timeout: 276 seconds]
TheodoreBe has quit [Quit: I have gone to sleep. ZZZzzz…]
bungoman has joined #ruby
yqt has joined #ruby
Oclair has quit [Read error: Connection reset by peer]
tristanp has quit [Ping timeout: 252 seconds]
Oclair has joined #ruby
_djbkd has joined #ruby
hipertracker has quit [Quit: hipertracker]
tristanp has joined #ruby
ghr has joined #ruby
blackmesa has quit [Ping timeout: 252 seconds]
hipertracker has joined #ruby
[Butch] has quit [Quit: I'm out . . .]
dennisvennink has quit [Read error: Connection reset by peer]
dennisvennink has joined #ruby
eljimmy has quit [Quit: This computer has gone to sleep]
imperator has quit [Quit: Leaving]
dionysus69 has quit [Remote host closed the connection]
dionysus69 has joined #ruby
ghr has quit [Ping timeout: 240 seconds]
nando293921 has joined #ruby
flughafen_ has quit [Ping timeout: 276 seconds]
xall has quit [Ping timeout: 264 seconds]
roma1 has left #ruby [#ruby]
codecop has quit [Remote host closed the connection]
wrkrcoop has joined #ruby
ghr has joined #ruby
<wrkrcoop>
I’m getting a date in this format: "12/02/2014 11:45:23 UTC" and i have to get it into something like this: "2015-01-01T21:12:23Z"
<wrkrcoop>
is there an easy way to do that?
leea has joined #ruby
<leea>
?help
sergey_makagon has quit [Remote host closed the connection]
<Papierkorb>
wrkrcoop: ISO-8601 defines your target format, as in, your target format is great as it's standarized
<wrkrcoop>
cool
swills has quit [Remote host closed the connection]
ghr has quit [Ping timeout: 240 seconds]
<havenwood>
wrkrcoop: Seems you're in Rails and want time with zone? Just for ideas: DateTime.strptime('12/02/2014 11:45:23 UTC', '%d/%m/%Y %H:%M:%S').in_time_zone('UTC').iso8601_time_zone('UTC').iso8601
<wrkrcoop>
havenwood: not in rails
rodfersou has quit [Quit: leaving]
<havenwood>
ah, bad paste anyways
<havenwood>
wrkrcoop: note the zone: "2015-01-01T21:12:23Z"
<havenwood>
Z
<wrkrcoop>
does that mean Time.parse("12/02/2014 11:45:23 UTC").iso8601 wont give me what i want?
<havenwood>
wrkrcoop: nvm me, i don't know what you want
nankyokusei has joined #ruby
<wrkrcoop>
derp
polishdub has joined #ruby
<wrkrcoop>
why do i get argument out of range for this: Time.parse("09/30/2015 00:00:00 UTC").iso86
<havenwood>
wrkrcoop: no, it looks good
<wrkrcoop>
but thats what i get
ghr has joined #ruby
<havenwood>
wrkrcoop: require 'time'
DoubleMalt has quit [Remote host closed the connection]
<wrkrcoop>
i did …
AngryBuzzy has joined #ruby
<havenwood>
wrkrcoop: use strptime to match your format
lxsameer has quit [Quit: WeeChat 1.5]
<drbrain>
wrkrcoop: ruby doesn't know if you're year/month day or day/month/year
<jhass>
Papierkorb: you need to be identified with nickserv
<drbrain>
wrkrcoop: make it Time.strptime(…).utc.iso8601
<wrkrcoop>
why .utc?
polishdub has quit [Ping timeout: 276 seconds]
TheodoreBe has joined #ruby
TheodoreBe has quit [Client Quit]
TheodoreBe has joined #ruby
<drbrain>
.utc should
<drbrain>
… err
<drbrain>
Z means UTC so it should force the iso8601 output to always be Z
TheodoreBe has quit [Max SendQ exceeded]
dminuoso has joined #ruby
Madplatypus has joined #ruby
weaksauce has quit [Ping timeout: 276 seconds]
chosen1 has quit [Read error: Connection reset by peer]
chosen1 has joined #ruby
polishdub has joined #ruby
ghr has quit [Ping timeout: 240 seconds]
icarus has joined #ruby
omphe has joined #ruby
dminuoso has quit [Ping timeout: 260 seconds]
tristanp has quit [Ping timeout: 252 seconds]
whathapp_ has quit [Remote host closed the connection]
whathappens has joined #ruby
bungoman has quit []
mistermocha has joined #ruby
drewo has quit [Quit: WeeChat 1.4]
drewo has joined #ruby
drewo has quit [Client Quit]
fullofcaffeine has joined #ruby
Ebok has joined #ruby
drewo has joined #ruby
sumobob has joined #ruby
mistermo_ has joined #ruby
Renich has joined #ruby
mistermocha has quit [Remote host closed the connection]
et09 has joined #ruby
mistermocha has joined #ruby
ghr has joined #ruby
`tim` has joined #ruby
whathappens has quit [Ping timeout: 258 seconds]
biberu has quit []
Rodya_ has joined #ruby
tristanp has joined #ruby
sergey_makagon has quit [Remote host closed the connection]
mistermo_ has quit [Ping timeout: 250 seconds]
skade has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
blackmesa has joined #ruby
mistermocha has quit [Ping timeout: 264 seconds]
`tim` has quit [Client Quit]
omphe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
LoneHermit has joined #ruby
flughafen_ has joined #ruby
lkb_ has quit [Quit: Wychodzi]
Ebok has quit [Quit: This computer has gone to sleep]
Sucks has joined #ruby
whathappens has joined #ruby
ghr has quit [Ping timeout: 240 seconds]
omphe has joined #ruby
synthroid has quit []
LoneHermit has quit [Ping timeout: 260 seconds]
SilverKey has joined #ruby
SHyx0rmZ has joined #ruby
Devalo has joined #ruby
ghr has joined #ruby
AndrewIsHere has joined #ruby
moeabdol2 has quit [Ping timeout: 272 seconds]
xall has joined #ruby
ldnunes has quit [Quit: Leaving]
dvinciguerra_ has quit [Ping timeout: 250 seconds]
marens has quit [Ping timeout: 272 seconds]
omphe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ghr has quit [Ping timeout: 240 seconds]
gizmore has joined #ruby
yuung has quit [Ping timeout: 272 seconds]
hipertracker has quit [Quit: hipertracker]
c355e3b has quit [Quit: Connection closed for inactivity]
AlexRussia has quit [Ping timeout: 276 seconds]
tmwnni has joined #ruby
tmwnni has left #ruby [#ruby]
ghr has joined #ruby
freerobby has quit [Quit: Leaving.]
gregf has quit [Quit: WeeChat 1.4]
Devalo has quit [Remote host closed the connection]
gregf has joined #ruby
fullofcaffeine has quit [Remote host closed the connection]
ghr has quit [Ping timeout: 240 seconds]
skweek has joined #ruby
synthroid has joined #ruby
tristanp has quit [Ping timeout: 252 seconds]
`tim` has joined #ruby
bruce_lee has quit [Ping timeout: 252 seconds]
hahuang61 has joined #ruby
Dreamer3 has joined #ruby
bruce_lee has joined #ruby
bruce_lee has quit [Changing host]
bruce_lee has joined #ruby
weaksauce has joined #ruby
tristanp has joined #ruby
ghr has joined #ruby
SilverKey has quit [Quit: Halted.]
spudowiar has joined #ruby
veduardo has joined #ruby
banisterfiend has joined #ruby
hahuang61 has quit [Ping timeout: 240 seconds]
c0mrad3 has quit [Quit: Connection closed for inactivity]
alfiemax has joined #ruby
marens has joined #ruby
SilverKey has joined #ruby
colegatron_origi has quit [Ping timeout: 240 seconds]
AndrewIsHere has quit [Remote host closed the connection]
AndrewIsHere has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
JeanCarloMachado has joined #ruby
drewo has quit [Quit: WeeChat 1.4]
ghr has quit [Ping timeout: 240 seconds]
xlegoman has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nando293921 has quit [Ping timeout: 244 seconds]
gregf has quit [Quit: WeeChat 1.4]
dminuoso has joined #ruby
malconis has quit [Ping timeout: 276 seconds]
drewo has joined #ruby
Nawn has joined #ruby
mistermocha has joined #ruby
Nawn has quit [Remote host closed the connection]
ghr has joined #ruby
Nawn has joined #ruby
Nawn has quit [Remote host closed the connection]
symm- has joined #ruby
colegatron_origi has joined #ruby
c355e3b has joined #ruby
dminuoso has quit [Ping timeout: 272 seconds]
swills has joined #ruby
drewo has quit [Quit: WeeChat 1.4]
DarkElement has joined #ruby
finnnnnnnnnnn has joined #ruby
ramfjord has quit [Ping timeout: 260 seconds]
ghr has quit [Ping timeout: 240 seconds]
zacts has quit [Ping timeout: 250 seconds]
s1kx has joined #ruby
<DarkElement>
I am trying to make a web scraper to get the mp3s for words that I search up on forvo, like this one: http://forvo.com/word/magenta . However, I am having trouble actually obtaining the mp3 from the link, since it opens a new page where a dialog box pops up, and doesn't have the actual .mp3 file there. Do you guys have any ideas? Been trying with the Nokogiri, open-uri, and Mechanize gems so far.
spudowiar has quit [Quit: Leaving.]
<drbrain>
DarkElement: the file that plays when you click one of the arrows?
<DarkElement>
Yea... never mind...
hackerdude has quit [Quit: Bye, everyone]
hipertracker has joined #ruby
blackmesa has quit [Quit: WeeChat 1.5]
<drbrain>
use your browser inspector to find the Play function
<drbrain>
looks like the URL is constructed there
blackmesa has joined #ruby
<drbrain>
Safari says it's in main.min.js
ghr has joined #ruby
<manveru>
DarkElement: the link actually has the mp3 link in base64
<DarkElement>
Yes I know
<DarkElement>
That's why never mind
<manveru>
:)
<DarkElement>
Just trying to find the full url to append that to
<manveru>
check your network tab when you play a file
dangerousdave has quit [Ping timeout: 276 seconds]
ghr has quit [Ping timeout: 240 seconds]
flashpoint9 has joined #ruby
ghr has joined #ruby
bmurt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
fredolinhares has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
ghr has quit [Ping timeout: 240 seconds]
SCHAAP137 has quit [Quit: Leaving]
Rodya_ has quit [Remote host closed the connection]
<arthurl>
hi guys- trying to bring up a rails app in production mode- appear to be having some trouble with the asset pipeline- i'm able to bring up the app in development mode without issue- but this is what i see in production: https://gist.github.com/alyssenko/886c83d353629d5d55d486039213cfeb
<arthurl>
any thoughts or input would be much appreciated- been looking into this for the past 3 hours
SCHAAP137 has joined #ruby
Robtop__ has joined #ruby
ghr has joined #ruby
<havenwood>
arthurl: For Rails-specific questions the #RubyOnRails channel is best!
<arthurl>
havenwood thank you sir- i tried asking there but didn't receive a response
whathappens has joined #ruby
pwnd_nsfw` has quit [Ping timeout: 250 seconds]
whathappens has quit [Remote host closed the connection]
SCHAAP137 has quit [Ping timeout: 240 seconds]
mrBen2k2k2k has joined #ruby
tristanp has quit [Ping timeout: 252 seconds]
nettoweb has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nettoweb has joined #ruby
ghr has quit [Ping timeout: 240 seconds]
nettoweb has quit [Client Quit]
Vingador has joined #ruby
tristanp has joined #ruby
mrBen2k2k2k has quit [Max SendQ exceeded]
bkxd has joined #ruby
DarkElement has joined #ruby
<DarkElement>
The prepending url is actually different in the headers each time. You guys know how to get that with ruby?
asianMike has left #ruby [#ruby]
<shevy>
no idea but I would insist on a .headers method!
ghr has joined #ruby
solars has quit [Ping timeout: 272 seconds]
arthurl has quit [Ping timeout: 276 seconds]
hipertracker has joined #ruby
<DarkElement>
what would the method be applied on
anuxivm has joined #ruby
fullofcaffeine has joined #ruby
agent_white has quit [Quit: home]
<wrkrcoop>
i need to create an object where i can access .body and [“status”]
<wrkrcoop>
its for a spec
Ebok has quit [Quit: This computer has gone to sleep]
<wrkrcoop>
i thought i coudl use OpenStruct
ghr has quit [Ping timeout: 240 seconds]
<wrkrcoop>
raw_response = OpenStruct.new
<wrkrcoop>
data = { "status" => "Fail" }.to_json
<wrkrcoop>
raw_response = OpenStruct.new(data)
<wrkrcoop>
raw_response.status = false
<wrkrcoop>
didn’t work
tristanp has quit [Ping timeout: 252 seconds]
mrBen2k2k2k has joined #ruby
sai has joined #ruby
Renich has quit [Quit: leaving]
synthroid has joined #ruby
symm- has quit [Ping timeout: 276 seconds]
synthroid has quit [Remote host closed the connection]
tristanp has joined #ruby
mistermocha has joined #ruby
flashpoint9 has quit [Remote host closed the connection]
ghr has joined #ruby
flashpoint9 has joined #ruby
nando293921 has joined #ruby
ur5us has joined #ruby
Vingador has quit [Remote host closed the connection]
<shevy>
I would assume that your .to_json modified stuff, you have a string then
mistermocha has quit [Ping timeout: 244 seconds]
AlexRussia has joined #ruby
<shevy>
Does anyone know of a simple way to "grab hash key at position 2"?
flashpoint9 has quit [Ping timeout: 250 seconds]
<shevy>
e. g. hash = { cat: 'Tom', mouse: 'Jerry', dog: 'Spike' }; hash[2] <--- won't work of course as there is no key called 2 but I sort of have to grab the key at a user-specified position, e. g. when the user inputs "45". My current approach would be to use .each which is probably not very clever
freerobby has quit [Quit: Leaving.]
Rodya_ has joined #ruby
drewo has quit [Ping timeout: 246 seconds]
mrBen2k2k2k has quit [Max SendQ exceeded]
toretore has quit [Ping timeout: 264 seconds]
Oclair_ has joined #ruby
ghr has quit [Ping timeout: 240 seconds]
dminuoso has joined #ruby
iamvery has quit [Remote host closed the connection]
benlieb has quit [Quit: benlieb]
marr has quit [Ping timeout: 244 seconds]
fullofcaffeine has quit [Remote host closed the connection]
iamvery has joined #ruby
Oclair has quit [Ping timeout: 250 seconds]
<Papierkorb>
shevy: you can benchmark that against doing something like hash[hash.keys[position]]
<shevy>
ah
_djbkd has quit [Quit: My people need me...]
ghr has joined #ruby
benlieb has joined #ruby
crystal77 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]