havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.5.1, 2.4.4, 2.3.7, 2.6.0-preview2: https://www.ruby-lang.org | Paste 4+ lines of text to https://gist.github.com | Rails questions? Ask in #RubyOnRails | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby
willthechill has joined #ruby
apeiros has joined #ruby
sameerynho has quit [Ping timeout: 264 seconds]
tty has joined #ruby
tdy has joined #ruby
apeiros has quit [Ping timeout: 264 seconds]
alfiemax has quit [Ping timeout: 264 seconds]
codymj has quit [Quit: Leaving]
alfiemax has joined #ruby
BaroMeter has joined #ruby
Venomen has quit [Quit: Leaving...]
BaroMeter has quit [Client Quit]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
za1b1tsu has quit [Ping timeout: 264 seconds]
nickjj_ has joined #ruby
jasmith has quit [Remote host closed the connection]
klaas has quit [Read error: Connection reset by peer]
jasmith has joined #ruby
alfiemax_ has joined #ruby
NightMonkey has quit [Ping timeout: 260 seconds]
garyserj has quit [Ping timeout: 240 seconds]
garyserj has joined #ruby
klaas has joined #ruby
Asher has quit [Read error: Connection reset by peer]
fluxAeon has quit [Ping timeout: 260 seconds]
alfiemax has quit [Ping timeout: 240 seconds]
Asher has joined #ruby
nickjj has quit [Ping timeout: 240 seconds]
orbyt_ has joined #ruby
NightMonkey has joined #ruby
dinfuehr has quit [Ping timeout: 260 seconds]
ren0v0 has quit [Ping timeout: 260 seconds]
AlHafoudh has quit [Ping timeout: 240 seconds]
AlHafoudh has joined #ruby
dinfuehr has joined #ruby
leitz has quit [Quit: Nappy time]
ren0v0 has joined #ruby
violentE has quit [Quit: Leaving]
eb0t has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ciscam has quit [Ping timeout: 276 seconds]
ciscam has joined #ruby
faces has quit [Ping timeout: 265 seconds]
apeiros has joined #ruby
orbyt_ has joined #ruby
mniip has quit [Quit: This page is intentionally left blank.]
donofrio has joined #ruby
mniip has joined #ruby
stairmast0r has quit [Quit: bye]
stairmast0r has joined #ruby
NingaLeaf has joined #ruby
GodFather has quit [Ping timeout: 248 seconds]
noobineer has joined #ruby
cosmopaladin has quit [Ping timeout: 240 seconds]
<SuperLag> When you have a whitespace array are you supposed to keep everyting on the same line, or do you extend it across multiple lines for readability?
<elomatreb> You can break across lines and indent, if it helps readability go for it
cosmopaladin has joined #ruby
jasmith has quit [Quit: Leaving]
MagePsycho has quit [Ping timeout: 244 seconds]
tolerablyjake has joined #ruby
subroot has joined #ruby
noobineer has quit [Read error: Connection reset by peer]
MagePsycho has joined #ruby
shinnya has quit [Ping timeout: 244 seconds]
noobineer has joined #ruby
noobineer has quit [Remote host closed the connection]
RougeR has quit [Ping timeout: 244 seconds]
akkiguru has joined #ruby
RougeR has joined #ruby
RougeR has quit [Changing host]
RougeR has joined #ruby
white_lilies has quit [Ping timeout: 265 seconds]
BloopMonster has quit [Ping timeout: 244 seconds]
Mekkis has joined #ruby
jasmith has joined #ruby
ReMOT3KonTRoL has joined #ruby
ReMOT3KonTRoL has left #ruby [#ruby]
RougeR has quit [Ping timeout: 260 seconds]
tolerablyjake has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
white_lilies has joined #ruby
cadillac_ has quit [Quit: I quit]
cadillac_ has joined #ruby
subroot has quit [Read error: Connection reset by peer]
braincrash has quit [Quit: bye bye]
braincrash has joined #ruby
samort7 has joined #ruby
tolerablyjake has joined #ruby
tdy has quit [Ping timeout: 256 seconds]
alfiemax_ has quit [Remote host closed the connection]
tolerablyjake has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tolerablyjake has joined #ruby
tolerablyjake has quit [Client Quit]
NingaLeaf has quit [Quit: Textual IRC Client: www.textualapp.com]
shinnya has joined #ruby
tdy has joined #ruby
ciscam has quit [Ping timeout: 244 seconds]
ciscam has joined #ruby
starseed0000 has quit [Ping timeout: 276 seconds]
cosmopaladin has quit [Quit: Leaving]
raynold has joined #ruby
Joufflu has quit [Ping timeout: 264 seconds]
dbugger_ has joined #ruby
dellavg has joined #ruby
Dbugger has quit [Ping timeout: 265 seconds]
bak1an has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alfiemax has joined #ruby
conta has joined #ruby
salasrod has quit [Quit: Leaving]
kryptoz has joined #ruby
duderonomy has joined #ruby
cadillac_ has quit [Ping timeout: 248 seconds]
dellavg has quit [Ping timeout: 268 seconds]
BloopMonster has joined #ruby
cadillac_ has joined #ruby
anisha has joined #ruby
akkiguru has quit [Ping timeout: 240 seconds]
rippa has joined #ruby
kvda has joined #ruby
kvda has left #ruby [#ruby]
kujira has joined #ruby
<robin> I'm having trouble deploying with capistrano. Here are the errors: 00:25 deploy:set_permissions:acl
<robin> 01 setfacl -Rn -m u:www-data:rwX -m u::rwX /var/www/something/releases/20180709044904/bootstrap/cache /var/www/something/rel…
<robin> 01 setfacl: Option -m: Invalid argument near character 3
conta has quit [Quit: conta]
apeiros has quit [Remote host closed the connection]
Inline has quit [Quit: Leaving]
apeiros has joined #ruby
za1b1tsu has joined #ruby
apeiros has quit [Ping timeout: 244 seconds]
demistify has joined #ruby
<havenwood> robin: Does setfacl take multiple -m flags?
<havenwood> robin: Same error with comma-delimited ACL entries?
<havenwood> robin: setfacl -Rn -m "u:www-data:rwX,u::rwX
<havenwood> "
<robin> havenwood: I think it is because of the empty -m u::rwX?
<robin> havenwood: how can I determine what should be written there?
<robin> havenwood: I check inside Gemfile.lock and there is this line: capistrano-file-permissions (~> 1.0)
<havenwood> robin: Have you already checked?: man setfacl
<havenwood> robin: Ah, you didn't write this code?
<robin> havenwood: no, it is being imported? I don't know how this all work
<robin> havenwood: so should I find that gem file and look for the variable?
<robin> and see what I need to add to my capistrano file?
<havenwood> robin: Guessing you also don't have a www-data user, so this fails: u:www-data
tdy has quit [Read error: Connection reset by peer]
ur5us has quit [Remote host closed the connection]
tdy has joined #ruby
<robin> havenwood: what is weird is that capistrano already ran this script on instance startup automatically and it didn't produce an error but when I try to execute it manually it fails.
<robin> havenwood: thanks for your help.
<havenwood> robin: you're welcome. good luck sorting it out!
<robin> havenwood: thanks!
Azure has quit [Ping timeout: 255 seconds]
Azure has joined #ruby
konsolebox has quit [Ping timeout: 248 seconds]
konsolebox has joined #ruby
akkiguru has joined #ruby
aupadhye has joined #ruby
demistify has quit [Ping timeout: 260 seconds]
Guest33352 is now known as ndrst
ndrst has quit [Changing host]
ndrst has joined #ruby
mistergibson has joined #ruby
white_lilies has quit [Ping timeout: 264 seconds]
conta has joined #ruby
apeiros has joined #ruby
andersh has quit [Read error: Connection reset by peer]
reber has joined #ruby
andersh has joined #ruby
Asher has quit [Read error: Connection reset by peer]
Asher has joined #ruby
akkiguru has quit [Ping timeout: 264 seconds]
cttttt has quit [Ping timeout: 240 seconds]
akkiguru has joined #ruby
TinkerT has quit [Read error: Connection reset by peer]
TinkerT has joined #ruby
akkiguru has quit [Ping timeout: 240 seconds]
cttttt has joined #ruby
pauliesaint has quit [Ping timeout: 264 seconds]
dhawan has joined #ruby
amar has joined #ruby
meinside has joined #ruby
amar has quit [Ping timeout: 244 seconds]
arekushi has joined #ruby
pauliesaint has joined #ruby
akkiguru has joined #ruby
alem0lars has joined #ruby
dhawan has left #ruby [#ruby]
konsolebox has quit [Ping timeout: 244 seconds]
aufi has joined #ruby
Deesl has joined #ruby
konsolebox has joined #ruby
andikr has joined #ruby
lavamind has quit [Ping timeout: 240 seconds]
Burgestrand has joined #ruby
conta has quit [Quit: conta]
claudiuinberlin has joined #ruby
troulouliou_dev has joined #ruby
lavamind has joined #ruby
Technato1 has joined #ruby
mtkd has joined #ruby
schneider has joined #ruby
^mtkd has joined #ruby
mtkd has quit [Ping timeout: 256 seconds]
quobo has quit [Quit: Connection closed for inactivity]
lxsameer has joined #ruby
schleppel has joined #ruby
Technato1 has quit [Ping timeout: 245 seconds]
Technato1 has joined #ruby
BloopMonster has quit [Ping timeout: 240 seconds]
clemens3 has joined #ruby
amar has joined #ruby
bastilian has quit [Ping timeout: 255 seconds]
sidntrivedi012[m has quit [Ping timeout: 240 seconds]
ignujee[m] has quit [Ping timeout: 240 seconds]
intheclouddan has quit [Ping timeout: 240 seconds]
jonjits[m] has quit [Ping timeout: 255 seconds]
cyberRodent has quit [Ping timeout: 240 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cyberRodent has joined #ruby
akkiguru has quit [Ping timeout: 244 seconds]
pauliesaint has quit [Ping timeout: 260 seconds]
alfiemax has quit [Remote host closed the connection]
ignujee[m] has joined #ruby
intheclouddan has joined #ruby
samort7 has quit [Quit: Leaving]
sidntrivedi012[m has joined #ruby
troulouliou_dev has quit [Quit: Leaving]
Deesl has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
akkiguru has joined #ruby
jonjits[m] has joined #ruby
Technato1 has quit [Ping timeout: 240 seconds]
pauliesaint has joined #ruby
bastilian has joined #ruby
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
conta has joined #ruby
pauliesaint has quit [Quit: pauliesaint]
pauliesaint has joined #ruby
mikecmpbll has joined #ruby
pauliesaint has quit [Client Quit]
pauliesaint has joined #ruby
graphene has quit [Remote host closed the connection]
mikecmpbll has quit [Client Quit]
graphene has joined #ruby
conta has quit [Ping timeout: 244 seconds]
guille-moe has joined #ruby
mikecmpbll has joined #ruby
nowhere_man has quit [Ping timeout: 240 seconds]
conta has joined #ruby
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
conta has quit [Ping timeout: 245 seconds]
ohcibi has joined #ruby
schneider has quit [Quit: WeeChat 2.0.1]
conta has joined #ruby
mrBen2k2k2k has quit [Read error: Connection reset by peer]
amelliaa has joined #ruby
mikecmpbll has joined #ruby
RougeR has joined #ruby
RougeR has joined #ruby
RougeR has quit [Changing host]
alem0lars has quit [Quit: Leaving]
mikecmpbll has quit [Quit: inabit. zz.]
nowhere_man has joined #ruby
jnollette has quit [Remote host closed the connection]
teclator has joined #ruby
alem0lars has joined #ruby
jnollette has joined #ruby
zautomata has joined #ruby
zautomata has quit [Changing host]
zautomata has joined #ruby
zautomata has left #ruby [#ruby]
XB23 has joined #ruby
agent_white has quit [Quit: leaving]
vondruch has joined #ruby
Technato1 has joined #ruby
nowhere_man has quit [Ping timeout: 245 seconds]
nowhere_man has joined #ruby
shinnya has quit [Ping timeout: 260 seconds]
kryptoz has quit [Remote host closed the connection]
Zaab1t has joined #ruby
conta has quit [Remote host closed the connection]
conta has joined #ruby
nowhereman_ has joined #ruby
nowhere_man has quit [Ping timeout: 240 seconds]
aufi has quit [Remote host closed the connection]
vonfry has joined #ruby
aufi has joined #ruby
sidx64 has joined #ruby
ur5us has joined #ruby
suukim has joined #ruby
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nowhereman_ has quit [Ping timeout: 245 seconds]
sidx64 has joined #ruby
jraavis has joined #ruby
ellcs has joined #ruby
cyberg has joined #ruby
sidx64 has quit [Client Quit]
sidx64 has joined #ruby
jraavis has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
duper has joined #ruby
<duper> Hi, I keep getting errors with open-uri, even with options={:ssl_verify_mode => 0} .. it says tlsv1 alert internal error.. any ideas?
<duper> if I use a plain HTTP URL, I get.. in `read_nonblock': end of file reached (EOFError)
mtkd has joined #ruby
^mtkd has quit [Read error: Connection reset by peer]
alem0lars has quit [Ping timeout: 244 seconds]
GodFather has joined #ruby
desperek has joined #ruby
suukim has quit [Quit: Konversation terminated!]
jraavis has joined #ruby
faces has joined #ruby
<apeiros> duper: yes, read_nonblock communicates end of file that way.
<duper> well, how do I fix the error? because I want the body of the HTTP response
<duper> i don't even mind if it's a synchronous socket read
tvw has joined #ruby
vondruch has quit [Quit: vondruch]
apparition has joined #ruby
jrafanie has joined #ruby
<apeiros> duper: I have no idea. you haven't given enough information.
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zapata has quit [Ping timeout: 256 seconds]
alfiemax has joined #ruby
<apeiros> but if you use read_nonblock, you're supposed to handle the potential and expected exceptions
rawste has joined #ruby
sidx64 has joined #ruby
tty has quit [Quit: tty]
ciscam has quit [Ping timeout: 260 seconds]
ciscam has joined #ruby
vonfry has quit [Remote host closed the connection]
nowhere_man has joined #ruby
nowhere_man has quit [Ping timeout: 240 seconds]
alex`` has joined #ruby
guille-moe has quit [Ping timeout: 240 seconds]
akkiguru has quit [Ping timeout: 244 seconds]
zapata has joined #ruby
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
shinnya has joined #ruby
ur5us has quit [Ping timeout: 244 seconds]
suukim has joined #ruby
vondruch has joined #ruby
akkiguru has joined #ruby
<apeiros> eh, not that important a problem I guess.
noobineer has joined #ruby
houhoulis has joined #ruby
megamos has joined #ruby
amelliaa has quit [Quit: -]
sidx64 has quit [Read error: Connection reset by peer]
sidx64 has joined #ruby
ldnunes has joined #ruby
alex`` has quit [Ping timeout: 240 seconds]
sidx64 has quit [Client Quit]
Technato1 has quit [Ping timeout: 255 seconds]
sidx64 has joined #ruby
alex`` has joined #ruby
megamos has quit [Ping timeout: 255 seconds]
fmcgeough has joined #ruby
fmcgeough has quit [Client Quit]
Technato1 has joined #ruby
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<TvL2386> apeiros: lol
sidx64 has joined #ruby
FernandoBasso has joined #ruby
ellcs has quit [Ping timeout: 255 seconds]
sidx64 has quit [Client Quit]
toks has joined #ruby
toks has quit [Remote host closed the connection]
alfiemax has quit [Read error: Connection reset by peer]
toks has joined #ruby
alfiemax has joined #ruby
toks has quit [Max SendQ exceeded]
synthroid has joined #ruby
sidx64 has joined #ruby
griffindy has joined #ruby
AJA4350 has joined #ruby
sidx64 has quit [Client Quit]
sidx64 has joined #ruby
andikr has quit [Ping timeout: 240 seconds]
andikr has joined #ruby
rwb has quit [Ping timeout: 260 seconds]
nowhere_man has joined #ruby
bak1an has joined #ruby
biberu has joined #ruby
apofis has joined #ruby
andikr has quit [Ping timeout: 255 seconds]
conta has quit [Quit: conta]
guille-moe has joined #ruby
conta has joined #ruby
houhoulis has quit [Remote host closed the connection]
kristofers has joined #ruby
<kristofers> Hello, i am having an issue when working with nested classes. I have a class B nested in A using a build pattern. When i try to assign self.my_object = my_object that was passed in the initialiser i get a (undefined method) my_object error
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<apeiros> kristofers: gist of minimal reproducible code please
<apeiros> (and it's almost certainly unrelated to the classes being nested)
XB23 has quit [Remote host closed the connection]
fmcgeough has joined #ruby
dbugger__ has joined #ruby
dbugger__ is now known as Dbugger
sidx64 has joined #ruby
dbugger_ has quit [Ping timeout: 268 seconds]
<apeiros> ugh, you should not mix spaces and tabs
<kristofers> yes sorry just noticed it
<kristofers> might just be a bad design, been trying to refactor some code to do some tdd
<kristofers> so i'll take any advice
<apeiros> B < A # this is inheritance, *not* nesting.
<kristofers> i meant the C part as nested
<kristofers> C = Notification
<apeiros> I do not see you defining a slack_resource= method anywhere. why do you expect it to exist?
<apeiros> as for minimal reproducible: this code is not reproducible. I can't run this code.
<kristofers> I will work a new one then, but maybe a question before i do so
<kristofers> Maybe the design is just bad and there is another way, if not then i'll make it reproducible
<apeiros> or rather, I can run it, but it won't exhibit the problem you care about.
<apeiros> I can't comment on the design as I don't have sufficient information (and I probably lack the time atm to process it if you were to provide sufficient information regarding the design)
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rwb has joined #ruby
Dbugger has quit [Ping timeout: 245 seconds]
alfiemax_ has joined #ruby
sidx64 has joined #ruby
<kristofers> can you check again the gist
<kristofers> should run now
<apeiros> ok. reproducible now.
<apeiros> the question stays the same, though: I do not see you defining a slack_resource= method anywhere. why do you expect it to exist?
alfiemax has quit [Ping timeout: 255 seconds]
sidx64 has quit [Client Quit]
alex`` has quit [Ping timeout: 244 seconds]
<kristofers> think i see now what my issue is
jraavis has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
<kristofers> i'm not trying to define a method
<kristofers> but trying to assign the object
<apeiros> what's that supposed to mean?
<kristofers> I'm trying to inject SlackResource into that class
andikr has joined #ruby
<apeiros> maybe you have a lack of understanding there. `self.slack_resource = slack_resource` invokes a method named "slack_resource="
<apeiros> it is not assignment. despite the = in it.
<kristofers> What is the difference then between self_slack= in Notification compared to self.notification= in ClassA
<apeiros> none with regards to both being methods.
<apeiros> and your example would break there too if it would pass that line of code.
<apeiros> since you don't define notification= either.
<apeiros> though it'd break earlier since ClassA::Notification would can't be looked up.
<apeiros> -would
jraavis has joined #ruby
<kristofers> Would then switching self. with @ work in terms of dependency injection
<kristofers> or is this entirely wrong
<apeiros> it's entirely different. whether it's wrong or not depends on the rest of your code.
nowhere_man has quit [Ping timeout: 245 seconds]
<apeiros> `@slack_resource =` is an assignment, it assigns the right hand side (RHS) to the instance variable @slack_resource.
<apeiros> you *can* have a method which does just that for self.slack_resource= too. ruby even provides convenience methods to create those methods.
<apeiros> `attr_accessor :slack_resource` will define both, a reader and a writer for @slack_resource.
Technato1 has quit [Ping timeout: 245 seconds]
jcalla has joined #ruby
<kristofers> I come from php and trying to get into tdd in ruby, the code i am working is not tested. so i'm trying to refactor it entirely. I was reading this article but it seems i either misundertood it or it's doing something different
Technato1 has joined #ruby
mniip has quit [Read error: Connection reset by peer]
nowhere_man has joined #ruby
mniip has joined #ruby
mniip has quit [Remote host closed the connection]
mniip has joined #ruby
<RougeR> why does every goddamn company use php
<RougeR> seriously
<apeiros> kristofers: it does help understanding the basics before building the bigger things ;-)
<kristofers> Well at the time i got sick of php, laravel came out but now i wish i started sooner in ruby
<apeiros> it can be ok though to just stumble over the basics while building a bigger things.
<kristofers> Any book suggestions, i'm planning on getting one from Sandi Metz
Technato1 has quit [Ping timeout: 245 seconds]
bmurt has joined #ruby
<apeiros> ?books
<ruby[bot]> You can find a list of recommended books at http://ruby-community.com/pages/links
<apeiros> hm
nowhere_man has quit [Remote host closed the connection]
<apeiros> I think this one is more up to date: https://goo.gl/wpGhoQ (from topic)
nowhere_man has joined #ruby
alfiemax_ has quit [Remote host closed the connection]
<kristofers> thank you
alfiemax has joined #ruby
YokoBR has joined #ruby
gnufied has joined #ruby
nowhere_man has quit [Ping timeout: 245 seconds]
<kristofers> RougeR since you were asking this question
<kristofers> What would you tell the company that asks you why switch to ruby ?
za1b1tsu has quit [Ping timeout: 240 seconds]
akkiguru has quit [Ping timeout: 260 seconds]
Es0teric has joined #ruby
<YokoBR> guys, please
<YokoBR> I'm having trouble running a passenger app
<YokoBR> The application encountered the following error: cannot load such file -- bundler/setup (LoadError)
skryking has quit [Quit: Leaving]
nowhere_man has joined #ruby
^mtkd has joined #ruby
orbyt_ has joined #ruby
mtkd has quit [Ping timeout: 260 seconds]
^mtkd has quit [Ping timeout: 265 seconds]
nowhere_man has quit [Ping timeout: 240 seconds]
mtkd has joined #ruby
cyberg has quit [Ping timeout: 264 seconds]
Inline has joined #ruby
soniya29 has joined #ruby
soniya29_ has joined #ruby
<canton7> YokoBR, you likely need to have bundler installed?
shinnya has quit [Ping timeout: 255 seconds]
<YokoBR> yep, I have, I guess
<YokoBR> But I guess I got rid of this error
<YokoBR> now its a nokogiri something
cyberg has joined #ruby
mtkd has quit [Remote host closed the connection]
mtkd has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
vondruch_ has joined #ruby
soniya29_ has quit [Ping timeout: 240 seconds]
guille-moe has quit [Quit: guille-moe]
soniya29 has quit [Ping timeout: 265 seconds]
guille-moe has joined #ruby
vondruch has quit [Ping timeout: 245 seconds]
vondruch_ is now known as vondruch
Asher has quit [Ping timeout: 248 seconds]
soniya29_ has joined #ruby
soniya29 has joined #ruby
<YokoBR> now it's The application encountered the following error: Unknown key: :order. Valid keys are: :class_name, :anonymous_class, :foreign_key, :validate, :autosave, :dependent, :primary_key, :inverse_of, :required, :as, :foreign_type (ArgumentError)
guille-moe has quit [Ping timeout: 244 seconds]
jrafanie has joined #ruby
mtkd has quit [Read error: Connection reset by peer]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
Deesl has joined #ruby
synthroid has quit [Remote host closed the connection]
samosaphile has joined #ruby
samosaphile has left #ruby [#ruby]
samosaphile has joined #ruby
quobo has joined #ruby
mtkd has joined #ruby
codymj has joined #ruby
<apeiros> YokoBR: you get a file and a line along with the exception
<apeiros> go there. figure what it might mean.
Rapture has joined #ruby
chouhoulis has joined #ruby
psychicist__ has joined #ruby
synthroid has joined #ruby
<YokoBR> E 2018-07-09 14:05:22.0781 14179/Te age/Cor/App/Implementation.cpp:221 apeiros
alex`` has joined #ruby
aupadhye has quit [Quit: Leaving]
<YokoBR> awn
<YokoBR> noope
apofis has quit [Ping timeout: 240 seconds]
jraavis has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
Dbugger has joined #ruby
<apeiros> eh, yeah… .cpp is rather unlikely 😂
alem0lars has joined #ruby
Deesl has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
* apeiros afk for ~40min
apeiros has quit [Read error: Connection reset by peer]
conta has quit [Quit: conta]
Burgestrand has quit [Quit: Closing time!]
Deesl has joined #ruby
kryptoz has joined #ruby
re_ has joined #ruby
<re_> how to get the browser timezone in haml file
za1b1tsu has joined #ruby
apeiros has joined #ruby
kryptoz has quit [Remote host closed the connection]
kryptoz has joined #ruby
apeiros has quit [Remote host closed the connection]
nickjj_ is now known as nickjj
<havenwood> re_: :javascript; Intl.DateTimeFormat().resolvedOptions().timeZone
clemens3 has quit [Ping timeout: 240 seconds]
za1b1tsu has quit [Ping timeout: 260 seconds]
sticaz has joined #ruby
jraavis has joined #ruby
apparition has quit [Quit: Bye]
GodFather has quit [Ping timeout: 240 seconds]
nowhere_man has joined #ruby
jraavis has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
za1b1tsu has joined #ruby
jraavis has joined #ruby
desperek has quit [Read error: Connection reset by peer]
claudiuinberlin has quit [Ping timeout: 244 seconds]
noobineer has quit [Remote host closed the connection]
graphene has quit [Remote host closed the connection]
<nchambers> I'm reading the guide for writing ruby gems, and have gotten to a point where it mentions bundler and rake for generating dynamic gemspecs. I'm slightly familiar with both of these tools, but I'm not sure which to use for my project. is there a comparison guide somewhere?
noobineer has joined #ruby
graphene has joined #ruby
cagomez has joined #ruby
jraavis has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
FrankyCyborg has quit [Quit: FrankyCyborg]
Deesl has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
za1b1tsu has quit [Ping timeout: 244 seconds]
RougeR has quit [Ping timeout: 244 seconds]
jraavis has joined #ruby
<havenwood> nchambers: I'd suggest just writing it from scratch.
<nchambers> oh ok
<havenwood> nchambers: Here's a simple one, for example: https://github.com/havenwood/digest-sip_hash/blob/master/digest-sip_hash.gemspec
<nchambers> i've got no problems writing a gemspec
<nchambers> thanks though
amar has quit [Remote host closed the connection]
<havenwood> nchambers: Yeah, if you're comfy writing a gemspec, I'd avoid the generators. They're probably more trouble than they're worth for you.
<nchambers> ok, thanks!
alfiemax has quit [Remote host closed the connection]
\void has joined #ruby
alcroito has joined #ruby
<alcroito> Hello, is anyone familiar with python's pudb cli / gui debugger, and knows if there is an equivalent for ruby? https://github.com/inducer/pudb
jabowa has joined #ruby
tolerablyjake has joined #ruby
apeiros has joined #ruby
Mike11 has joined #ruby
<Zarthus> sounds like you want pry
<jabowa> Is there a way to log a string and variable side by side? For example, puts "age: ", age outputs this as age in one line and then the variable value in the next line. How to output it as, age: 33 (one line).
<Zarthus> not quite a 1:1 comparison, but it'll work
soniya29_ has quit [Ping timeout: 240 seconds]
soniya29 has quit [Ping timeout: 240 seconds]
<havenwood> jabowa: puts "age: #{age}"
<havenwood> jabowa: print 'age: ', age, "\n"
<alcroito> Zarthus thank you, i will look into it, although it seems it doesn't have a graphical view
<havenwood> jabowa: sprintf "age: %s", 42
<Zarthus> alcroito: I don't know of standalone graphical debuggers, RubyMine might have something though
dbugger_ has joined #ruby
<jabowa> Thanks
<alcroito> Zarthus i suppose, although that's a bit heavy weight for my liking
mikecmpbll has joined #ruby
Dbugger has quit [Disconnected by services]
dbugger_ is now known as Dbugger
andikr has quit [Remote host closed the connection]
jcarl43 has joined #ruby
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
anisha has quit [Quit: This computer has gone to sleep]
aufi has quit [Ping timeout: 244 seconds]
kryptoz has quit [Remote host closed the connection]
<re_> how to get the datetime format from a ruby object
<re_> ?
cthulchu has joined #ruby
Burgestrand has joined #ruby
<re_> havenwood: how to get the datetime format from a ruby object?
<re_> something like this %A %ORD %B, %Y
chkhanch has joined #ruby
orbyt_ has joined #ruby
jrafanie_ has joined #ruby
orbyt_ has quit [Client Quit]
<havenwood> re_ http://strftimer.com/
_aeris_ has quit [Remote host closed the connection]
jrafanie has quit [Ping timeout: 248 seconds]
_aeris_ has joined #ruby
<re_> havenwood: I need reverse of that
<re_> like i give a datetime object and i need a format which i would pass to in_timezone()
r29v has joined #ruby
<havenwood> re_: Going from a DateTime to a specific format is what DateTime.strftime does.
orbyt_ has joined #ruby
akaiiro has joined #ruby
<re_> but I donno the format that i get from the server
<re_> havenwood: ^^
<re_> it may change upon user settings
<havenwood> What format of what?
<havenwood> I don't know what we're talking about. I don't have any context here.
<re_> give me a min
<apeiros> they seem to ask the wrong way round
<apeiros> sounds like they want to parse a date formatted as a string
<re_> havenwood: All i need is how can i get the date time format (i.e: something like this %A %ORD %B, %Y) for an object
<re_> object is a datetime object
akaiiro has quit [Remote host closed the connection]
<apeiros> re_: ruby does not have a class for date formats
<apeiros> date formats are expressed as strings.
<re_> yeah can i get that string somehow for a datetime object
<havenwood> re_: You have DateTimes and want Strings? Or you have Strings and want DateTimes?
<apeiros> and a datetime object itself does not have a format at all.
kryptoz has joined #ruby
<havenwood> re_: (Both Strings and DateTimes are Objects.)
<re_> I have datetimes and want strings (such as this "%A %ORD %B, %Y")
<havenwood> re_: Did you try strftime? Docs are linked in my link above.
mtkd has quit []
<apeiros> now it sounds like they have "2018-06-07" and want to get "%Y-%m-%d" from that?!?
<havenwood> ¯\_(ツ)_/¯
<havenwood> re_: Show us what you have, and what you want?
<re_> DateTime.parse(view.datetime) i have this object and i need the format of that object
<apeiros> ok. I'll repeat then:
<havenwood> re_: Like: I have `#<DateTime: 2018-08-09...>` and I want `"%Y-%D-%M"`
<apeiros> DateTime objects do not have a format.
<re_> exactly
Burgestrand has quit [Quit: Closing time!]
<havenwood> exactly to who? hehe
<havenwood> I'm confused!
* apeiros would assume exactly to havenwood
<re_> lol i was too.. that exactly was exactly to havenwood
darkhanb has joined #ruby
<re_> :P
<havenwood> re_: How would you know which is the month and which is the day? Those seem ambiguous?
renzhi has joined #ruby
<apeiros> or you mean the format view.datetime had?
<havenwood> ^
<re_> apeiros: yes
<apeiros> 18:26 apeiros: now it sounds like they have "2018-06-07" and want to get "%Y-%m-%d" from that?!?
<apeiros> so it was ^ :D
<re_> apeiros: isn't that possible to get
<apeiros> I don't think core/stdlib exposes that.
<havenwood> apeiros: oh, wow - good intuition!
r29v has quit [Quit: r29v]
<apeiros> I'm not even sure whether Date::parse builds such an expression internally when processing input
<havenwood> re_: Show us all the formats you might get. Or do you now know all the options?
<apeiros> re_: what do you need it for?
Deesl has joined #ruby
jrafanie_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alcroito has left #ruby ["Textual IRC Client: www.textualapp.com"]
<re_> So user would opt for a format out of a list.. so depending on what he selected I want to convert it to his local timezone and show him in the format which he selected
<re_> this is what i was trying to achieve apeiros havenwood
<apeiros> I fail to see the need to extract the format from a date/time string then.
<apeiros> I mean… the user explicitly selects it
claudiuinberlin has joined #ruby
<re_> i store everything in UTC in the server
<apeiros> so?
akaiiro has joined #ruby
<re_> how can I get the same format in JS as in ruby
<re_> is it possible to change the timezone of a ruby object in JS ? could you let me know how
<apeiros> a) don't format it in js, but on the server instead, b) if instead you want to format it in JS, good luck
<apeiros> b) cont., there's a couple of js date/time libs. but still - good luck. js & date = hell.
<apeiros> re_: you can't have a ruby object in js.
<re_> how can i get the timezone of browser in server side?
<apeiros> you tell the server.
<re_> apeiros: so is there any other approach?
quobo has quit [Quit: Connection closed for inactivity]
mtkd has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
<apeiros> why do you need another approach? (maybe, wouldn't come to my mind right now, though)
<re_> apeiros: okay thanks much. havenwood you too
re_ has quit [Quit: Page closed]
lxsameer has quit [Ping timeout: 240 seconds]
troys has joined #ruby
kryptoz has quit [Remote host closed the connection]
cadillac_ has quit [Ping timeout: 240 seconds]
cadillac_ has joined #ruby
meinside has quit [Quit: Connection closed for inactivity]
eckhardt_ has joined #ruby
lxsameer has joined #ruby
r29v has joined #ruby
kryptoz has joined #ruby
Zaab1t has quit [Quit: Zaab1t]
Guest26613 has quit [Read error: Connection reset by peer]
<nchambers> I wrote a class that is working fine, but it opens a file in the initializer. does ruby have a method for classes so that I can close it when the object is destroyed?
alem0lars has quit [Ping timeout: 256 seconds]
Nicmavr has joined #ruby
Nicmavr is now known as Guest80173
<elomatreb> Generally finalizers are a very fragile way to deal with resources, Ruby prefers you use explicit management (e.g. blocks) where applicable
<apeiros> nchambers: there are no destructors, only finalizers. and the time when they are run is not determined.
<apeiros> ^ what elomatreb said. preferably use blocks.
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mikeyg1234 has joined #ruby
<mikeyg1234> its not reporting correctly, the SSL expiary
Deesl has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jasmith has quit [Quit: Leaving]
jabowa has quit [Quit: Page closed]
Deesl has joined #ruby
<nchambers> alright, thanks guys
<havenwood> mikeyg1234: An alternative to shelling out to `which`: require 'mkmf'; find_executable 'openssl'
nowhere_man has quit [Ping timeout: 256 seconds]
sameerynho has joined #ruby
<havenwood> mikeyg1234: When you say the ssl expiry isn't reporting correctly, you mean when this line is run or somewhere else?: https://github.com/pingdomserver/scout-plugins/blob/master/ssl_monitor/ssl_monitor.rb#L64
Mike11 has quit [Ping timeout: 240 seconds]
gr33n7007h has joined #ruby
gr33n7007h is now known as al2o3-cr
Cork has quit [Ping timeout: 265 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Guest69107 has quit [Remote host closed the connection]
jraavis has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
YokoBR has quit [Ping timeout: 252 seconds]
Inline_ has joined #ruby
Evesy has quit [Ping timeout: 260 seconds]
ErhardtMundt has quit [Quit: No Ping reply in 180 seconds.]
Inline has quit [Remote host closed the connection]
dviola has joined #ruby
mynameisdebian has joined #ruby
ErhardtMundt has joined #ruby
Evesy has joined #ruby
<chkhanch> Hello everyone, I have 2 models with links has_many, belongs_to. The model that is connected as has_many in the second model, contains the enum. Can I link belongs_to only to a specific value of enum
augcesar has joined #ruby
anisha has joined #ruby
<apeiros> ?rails chkhanch
<ruby[bot]> chkhanch: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<NightMonkey> Are rbenv questions appropriate here?
amar_ has joined #ruby
<apeiros> yes
<apeiros> it might have its own channel too, though
<NightMonkey> apeiros: Thanks.
dviola has quit [Quit: WeeChat 2.1]
<chkhanch> tnx
alfiemax has joined #ruby
renzhi has quit [Ping timeout: 255 seconds]
<mikeyg1234> when i say the SSL expiry isnt reporting correctly i mean like if i used a tool such as https://www.sslshopper.com/ssl-checker.html#hostname=showroomhq.com
pr0ton has joined #ruby
<mikeyg1234> it reports correctly as 358 days left, whereas if i run that script on my pingdom server (uses scoutd) it reports 1023 days until expiry
<mikeyg1234> which is crazy off ...
kapil___ has joined #ruby
renzhi has joined #ruby
<NightMonkey> I have vagrant installed in /usr/bin/vagrant. I want to use that vagrant in rbenv environments. However, I get "rbenv: vagrant: command not found".
<NightMonkey> Any suggestions on how to make rbenv play nice with system-level vagrant?
erratic has joined #ruby
<cjohnson> I have an array that I got from JSON.parse, how can I pluck one key from each item in the array if it exists as a new array?
Eiam has joined #ruby
<cjohnson> Like JSON.parse(body).map(&:key) only it's not a symbol
GodFather has joined #ruby
<havenwood> ?rbenv NightMonkey
<ruby[bot]> NightMonkey: Missing command under rbenv? Did you try `rbenv rehash`?
<NightMonkey> @havenwood: Yep. Same result, sadly.
<havenwood> NightMonkey: Check your PATH?
<cjohnson> JSON.parse(body).collect { |e| e['key'] } is the best I've found, but then I'm going to wrap that in an rspec expect so it's a bit cumbersome
akaiiro has quit [Ping timeout: 244 seconds]
lytol has joined #ruby
orbyt_ has joined #ruby
megamos has joined #ruby
<havenwood> cjohnson: Yeah, that's what I'd do: JSON.parse(body).map { |h| h['key'] }.compact
Cork has joined #ruby
<havenwood> cjohnson: If you wanted to be a bit more particular about adding key's values, even if `nil`: JSON.parse(body).each_with_object([]) { |h, result| result << h[key] if h.key?(key) }
<havenwood> cjohnson: Or two iterations might read nicer: JSON.parse(body).select { |h| h.key? key }.map { |h| h[key] }
whippythellama has joined #ruby
alfiemax has quit [Ping timeout: 264 seconds]
alfiemax has joined #ruby
akaiiro has joined #ruby
<NightMonkey> havenwood: Sadly (for me), it is inside a test-kitchen run, so I'm having trouble figuring out what the PATH would be there. But I'll keep digging.
<cjohnson> Yeah it's all too long for what I wanted to do with it
<cjohnson> I defined a lambda instead
<cjohnson> get_options = ->(g) { g['options'] }
<cjohnson> expect(JSON.parse(subject.body).map(&get_options)).to all(be_present)
<havenwood> cjohnson: that reads nicely
jraavis has joined #ruby
lxsameer has quit [Ping timeout: 265 seconds]
jdeen has quit [Remote host closed the connection]
suukim has quit [Quit: Konversation terminated!]
<NightMonkey> Ah, argh. There's a gem 'vagrant-wrapper' that is required for this. Not obvious, and I keep forgetting it...
megamos has quit [Ping timeout: 264 seconds]
jrafanie has joined #ruby
lxsameer has joined #ruby
tdy has quit [Ping timeout: 244 seconds]
netfrog has quit [Read error: Connection reset by peer]
netfrog has joined #ruby
graphene has quit [Remote host closed the connection]
whippythellama has quit [Quit: WeeChat 1.4]
whippythellama has joined #ruby
graphene has joined #ruby
bak1an has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tdy has joined #ruby
kristofers has quit [Remote host closed the connection]
<baweaver> cjohnson: Sounds like a job for Mf
<baweaver> JSON.parse(body).map(&Mf['key'])
Rapture has quit [Quit: Textual IRC Client: www.textualapp.com]
<havenwood> baweaver: can you compose Mfs?
mtkd has quit []
<baweaver> Probably.
<baweaver> Essentially they're just giving you back something like this:
<havenwood> ah -> a { a[b] }
<baweaver> >> class Mf;def self.+(b)->a{a+b};end; (1..5).map(&Mf + 5)
<ruby[bot]> baweaver: # => /tmp/execpad-59a8cbf2e193/source-59a8cbf2e193:7: syntax error, unexpected end-of-input, expecting ke ...check link for more (https://eval.in/1033941)
<cjohnson> havenwood: If it's not stdlib I don't want it
whippythellama has quit [Ping timeout: 264 seconds]
<cjohnson> stdlib + rails std lib
<baweaver> >> class Mf;def self.+(b)->a{a+b};end;end;(1..5).map(&Mf + 5)
<ruby[bot]> baweaver: # => [6, 7, 8, 9, 10] (https://eval.in/1033942)
<cjohnson> Your monstrosity was not invented here and that is a problem
<baweaver> 'tis no monster good sir, merely misunderstood
<cjohnson> lol
<baweaver> Xf is more fun anyways, I agree
<cjohnson> Nah but really it's a one-off situation, not worth pulling a gem when a lambda solves it
Asher has joined #ruby
whippythellama has joined #ruby
<baweaver> True. Most of the time if I need something for heavy lifting it'll be Xf or Qo.
<baweaver> Xf is real dang handy when going through JSON logs.
<havenwood> interesting that Elixir deprecated Enum.filter_map: https://niallburkley.com/blog/elixir-filter-map/
Deesl has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Mikasi has joined #ruby
megamos has joined #ruby
Asher has quit [Ping timeout: 244 seconds]
lxsameer has quit [Ping timeout: 240 seconds]
jraavis has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
amar_ has quit [Remote host closed the connection]
mtkd has joined #ruby
alfiemax_ has joined #ruby
cadillac_ has quit [Ping timeout: 244 seconds]
Asher has joined #ruby
lxsameer has joined #ruby
cadillac_ has joined #ruby
alfiemax has quit [Ping timeout: 244 seconds]
Asher has quit [Ping timeout: 240 seconds]
Deesl has joined #ruby
cadillac_ has quit [Read error: Connection reset by peer]
Deesl has quit [Client Quit]
alfiemax_ has quit [Remote host closed the connection]
Mikasi has quit [Ping timeout: 240 seconds]
cadillac_ has joined #ruby
Deesl has joined #ruby
alfiemax has joined #ruby
tenderlove has joined #ruby
cadillac_ has quit [Ping timeout: 260 seconds]
lxsameer has quit [Ping timeout: 240 seconds]
dviola has joined #ruby
Deesl has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sauvin has quit [Read error: Connection reset by peer]
dhollin is now known as dhollinger
cadillac_ has joined #ruby
lxsameer has joined #ruby
alfiemax has quit [Remote host closed the connection]
Deesl has joined #ruby
Rapture has joined #ruby
Deesl has quit [Client Quit]
mynameisdebian has quit [Remote host closed the connection]
za1b1tsu has joined #ruby
jamesaxl has joined #ruby
cadillac_ has quit [Ping timeout: 268 seconds]
cadillac_ has joined #ruby
Deesl has joined #ruby
Deesl has quit [Client Quit]
netfrog has quit [Quit: netfrog]
dviola has quit [Quit: WeeChat 2.1]
mtkd has quit []
Sina has quit [Quit: Connection closed for inactivity]
kryptoz has quit [Remote host closed the connection]
lxsameer has quit [Ping timeout: 248 seconds]
mtkd has joined #ruby
dviola has joined #ruby
Cork has quit [Quit: .]
tdy has quit [Ping timeout: 244 seconds]
jsaak has quit [Ping timeout: 248 seconds]
Cork has joined #ruby
<cthulchu> folks, I noticed that .search always keeps the order of things
<cthulchu> which is super comfortable
<cthulchu> but how reliable is it
lxsameer has joined #ruby
lightstalker has joined #ruby
<cthulchu> I meant .select
mynameisdebian has joined #ruby
<elomatreb> cthulchu: About the ordering part? Unless you have parallel code that is breaking assumptions the ordering guarantee is reliable
<cthulchu> very cool, thanks a lot!
nowhere_man has joined #ruby
anisha has quit [Quit: This computer has gone to sleep]
dviola has quit [Quit: WeeChat 2.1]
salasrod has joined #ruby
<havenwood> cthulchu: Order is part of the ISO spec. It's not just an implementation detail. You can rely on the order.: "If this call results in a trueish object, append X to A."
dviola has joined #ruby
<cthulchu> cool
<havenwood> See the draft Ruby ISO: https://www.ipa.go.jp/files/000011432.pdf
<havenwood> (It's final and published, but just the final draft is free.)
<samosaphile> hey havenwood
<havenwood> samosaphile: hey
megamos has quit [Ping timeout: 240 seconds]
rawste has quit [Quit: Sleep....]
mtkd has quit []
alfiemax has joined #ruby
shinnya has joined #ruby
<samosaphile> any idea how to build a web crawler/scraper in ruby? something that can for example, go through each directory and subdirectory, here: http://gentool.net/data/zh/ looking for .txt files such as http://gentool.net/data/zh/2018_07_July/09_Monday/-beginner-_EKDSILEHOIEI/17-53-11_2v2v2_wuestenf_MaSTeRAc_beginner_akagoisU_Goopher4_SolidSna.txt then like read or scrape certain info from these .txt files but not all?
<havenwood> samosaphile: You *could* build your own crawler. It's much easier to just use a crawler gem.
weaksauce has joined #ruby
<samosaphile> hmm
mtkd has joined #ruby
<havenwood> samosaphile: Here's one: https://github.com/postmodern/spidr
alfiemax has quit [Ping timeout: 244 seconds]
lxsameer has quit [Ping timeout: 244 seconds]
tdy has joined #ruby
jrich523 has joined #ruby
<samosaphile> i see, thx
nicht has joined #ruby
Asher has joined #ruby
<samosaphile> is it really hard building your own? like what topics do you need to know or understand? i was thinking of using like library/framework but they all seem so bloated and like have hundreds of features but what im trying to crawl/scrape seems simple but idk
shinnya has quit [Ping timeout: 268 seconds]
<lupine> not trivial, not particularly hard
rawste has joined #ruby
<lupine> it's just gluing net/http to nokogiri or whatever
<lupine> I'd just use wget --mirror
dinfuehr has quit [Ping timeout: 244 seconds]
fluxAeon_ has quit [Ping timeout: 268 seconds]
dinfuehr has joined #ruby
claudiuinberlin has joined #ruby
<samosaphile> wouldn't --mirror download everything?
havenwood has quit [Quit: ZNC 1.7.0 - https://znc.in]
havenwood has joined #ruby
havenwood has quit [Changing host]
havenwood has joined #ruby
sphenxes has joined #ruby
sphenxes has quit [Max SendQ exceeded]
havenwood has quit [Client Quit]
<samosaphile> well....i guess you've to download everything anyway to read/see... what is within it first and then filter / discard info you don't want...
<samosaphile> it's just so confusing when there's like a million frameworks to do same thing, which one to pick
<tycoon177> i am trying to contribute to an open source gem but am having troubles figuring out how to get an actual stack trace from minitest. The gem interfaces with activerecord and simply reports that there was an error and gives me the location of the original test in activerecord's test suite, but it doesn't give me any more code locations to check (like where the actual exception happened, for example)
<tycoon177> is there any way to have minitest output a full stack trace when there's an error that occurs?
<tycoon177> not a failure, but an error
havenwood has joined #ruby
havenwood has joined #ruby
havenwood has quit [Changing host]
VeryBewitching has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
fluxAeon has joined #ruby
za1b1tsu has quit [Ping timeout: 244 seconds]
Burgestrand has joined #ruby
lxsameer has joined #ruby
mtkd has quit [Ping timeout: 240 seconds]
<samosaphile> lupine: yeah, you're right..they just downloading + html parsing... i don't need everything tho..just realized most of those folders are empty... so just need to write something like looks for folder of current month (july) and maybe previous month (june) .. then somehow like maybe do .scan/*.txt/ or some kind of regex scan for only .txt files in folder so it only download those instead of like everything else
r29v has quit [Quit: r29v]
<samosaphile> i just don't understand how .. like website has (A) directory with folders -> (B) sub directory with folders -> (C )the files (.rep, .jpeg, .txt) .. so like going from A -> B -> C ... do you need to download everything in B to get to C?
<zenspider> tycoon177: yo
<samosaphile> nvm, ..not trivial, just use a crawler gem
<tycoon177> hi zenspider o/
<zenspider> tycoon177: minitest always reports a backtrace on error. On failure it reports just the location of the _assertion_ in the backtrace. Can you show me an example of the problem output? (use gist or something)
lxsameer has quit [Ping timeout: 264 seconds]
<tycoon177> zenspider: here you go! I'm trying to help update a mssql adapter to rails 5.2 and this just isn't giving me the output that i need to track down these bugs :p https://gist.github.com/BenMcH/fb2bd18ccef112fc0320014966d494dc
quobo has joined #ruby
<tycoon177> sorry it's not the full test suite. there's a lot of them and one of the tests causes the whole suite to hang
FernandoBasso has quit [Quit: Page closed]
planigan has quit [Ping timeout: 260 seconds]
sidx64 has joined #ruby
nicht has quit [Ping timeout: 256 seconds]
lxsameer has joined #ruby
planigan has joined #ruby
alex`` has quit [Quit: WeeChat 2.1]
fmcgeough has quit [Quit: fmcgeough]
biberu has quit []
rwb has quit [Ping timeout: 264 seconds]
mtkd has joined #ruby
lxsameer has quit [Ping timeout: 260 seconds]
dviola has quit [Quit: WeeChat 2.1]
mtkd has quit [Ping timeout: 244 seconds]
lxsameer has joined #ruby
mtkd has joined #ruby
chkhanch has quit [Remote host closed the connection]
hfp_work has quit [Ping timeout: 240 seconds]
DTZUZU has quit [Quit: WeeChat 1.9]
<tycoon177> zenspider: i was able to find that setting `BACKTRACE=yes` (anything not null, i think) in my environment, minitest is now outputting full stack traces for me :)
<tycoon177> so my full command is now `BACKTRACE=yes bundle exec rake test`
mcritchlow has joined #ruby
hfp_work has joined #ruby
nowhere_man has quit [Ping timeout: 248 seconds]
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Dbugger has quit [Ping timeout: 265 seconds]
synthroid has quit []
lxsameer has quit [Ping timeout: 244 seconds]
mynameisdebian has quit [Remote host closed the connection]
<zenspider> tycoon177: sorry... catching up
<zenspider> tycoon177: and there isn't more output in the report below?
<zenspider> That's all rails obscuring minitest, tbh... Another way to do it is to run with `ruby -d` to turn off all of minitest's filtering.
<tycoon177> no worries! irc is async :p that's all that would be shown for each error unless i set the BACKTRACE env variable
<zenspider> But then you see EVERY exception as it is thrown
<zenspider> turn off the inline error reporting and I think you'll get better output
<zenspider> man I hate what they've done to minitest
rawste has quit [Quit: Sleep....]
lxsameer has joined #ruby
<zenspider> I usually run rails tests with `rake` instead of `rails test` to bypass a lot of the stuff they hook up
<zenspider> `rails` is basically just a messy front end for `rake` anyways. messy and slower
dviola has joined #ruby
<cthulchu> ok, so any number or string is truthy
Es0teric has quit [Quit: Computer has gone to sleep.]
griffindy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<zenspider> every object is truthy except false and nil
Mrgoose2 has quit [Quit: ZNC 1.7.x-nightly-20170908-e86efb08 - https://znc.in]
Mrgoose2 has joined #ruby
lxsameer has quit [Ping timeout: 240 seconds]
<zenspider> how "reliable" is select?!?
<zenspider> wtf does that even mean?
<apeiros> I never trusted it. it always seemed sketchy.
<apeiros> I mean… it selects. sounds so biased.
<zenspider> I'm going back to coding in C+-
<zenspider> (and OOOLD april fools joke for a language called "C, more or less")
<zenspider> I should dig that up
<apeiros> 😄
<Eiam> select sometimes fails to select, kappa.
hfp_work has quit [Ping timeout: 240 seconds]
<apeiros> I find elect much more trusty
<Eiam> the bug in which 90% of my code stops working immediately
<zenspider> Can't find it. There's a lot of papers now that use "C; (more or less)". Stupid google.
<zenspider> apeiros: you can't trust elect! Vote rigging!
<apeiros> you just have to pass the right block to gerrymander!
<Eiam> but it keeps re-writing my blocks every election
<zenspider> oh. apparently it was april, but not april 1.
lxsameer has joined #ruby
hfp_work has joined #ruby
rwb has joined #ruby
<tycoon177> zenspider: it may seem silly, but that's the desired behavior in this case (seeing exceptions as they're thrown) because my test suite never finishes due to a weird test that uses 2 nested forks in the activerecord codebase
alfiemax has joined #ruby
ldnunes has quit [Remote host closed the connection]
r29v has joined #ruby
kapil___ has quit [Quit: Connection closed for inactivity]
hfp_work has quit [Ping timeout: 240 seconds]
FernandoBasso has joined #ruby
alfiemax has quit [Ping timeout: 240 seconds]
mynameisdebian has joined #ruby
claudiuinberlin has quit [Quit: Textual IRC Client: www.textualapp.com]
lxsameer has quit [Ping timeout: 256 seconds]
<zenspider> tycoon177: And you're trying to identify the tests causing that? There are better ways. Running `rake TESTOPTS=-v` will show all the tests AS they are running.
zachk has joined #ruby
zachk has joined #ruby
zachk has quit [Changing host]
<zenspider> unfortunately, the "never finishing test suite" doesn't lend itself well to minitest-bisect... but maybe you could put in some sort of "if it takes longer than N seconds, exit non-zero" or some other construct to make minitest-bisect work properly
<tycoon177> zenspider: nah, i've identified the test, but not why it's failing on rails 5.2. right now, i'm just trying to update a gem to help out the maintainer since our company uses his gem in every single project
hfp_work has joined #ruby
<zenspider> gotcha. If you need some help, I do consult. Lemme know if I can help.
<tycoon177> ah no worries. thank you though!
<mikeyg1234> hey i have a problem... so im tryng to use this script to give me the days left until SSL certificate expires https://github.com/pingdomserver/scout-plugins/blob/master/ssl_monitor/ssl_monitor.rb
<mikeyg1234> but its spitting out 1023 days
ur5us has joined #ruby
<mikeyg1234> but i check with echo | openssl s_client -servername www.showroomhq.com -connect www.showroomhq.com:443 2>/dev/null | openssl x509 -noout -enddate
<mikeyg1234> and its definitely not 1023 days
<zenspider> your code is not really written in a way to make it usable here. I'd focus on line 48 and go backwards from there. Also not sure if you really need to do any of that shell stuff to get this info tho.
<mikeyg1234> its ruby isn tit?
RougeR has joined #ruby
RougeR has quit [Changing host]
RougeR has joined #ruby
dinfuehr has quit [Ping timeout: 240 seconds]
dinfuehr has joined #ruby
schleppel has quit [Quit: Konversation terminated!]
<zenspider> mikeyg1234: and therefore always runs and always works? You provided a file in a library, not a reproducible problem.
<zenspider> so I pointed you at the problem location and you can work it backwards from there
<mikeyg1234> thanks ill take a look
<mikeyg1234> this is a scoutd script
beefjoe has joined #ruby
<zenspider> this is a cleaner way to run that program btw:
<zenspider> openssl s_client -servername www.showroomhq.com -connect www.showroomhq.com:443 < /dev/null 2> /dev/null | openssl x509 -noout -enddate
mynameisdebian has quit [Remote host closed the connection]
Rapture has quit [Quit: Textual IRC Client: www.textualapp.com]
griffindy has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lxsameer has joined #ruby
^mtkd has joined #ruby
mtkd has quit [Read error: Connection reset by peer]
darix has quit [Quit: brb]
ur5us has quit [Remote host closed the connection]
<mikeyg1234> i figured out wghat the issue is
<mikeyg1234> gotta specify the SNI
<mikeyg1234> since it has multiple SSL certs on that one IP
<mikeyg1234> it grabbed the wrong one for me
ur5us has joined #ruby
Burgestrand has quit [Quit: Closing time!]
VeryBewitching has quit [Quit: Konversation terminated!]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<zenspider> so is 1023 the right answer?
<mikeyg1234> nope its 358
nicesignal has quit [Remote host closed the connection]
nicesignal has joined #ruby
griffindy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
reber has quit [Remote host closed the connection]
<mikeyg1234> "SNI stands for Server Name Indication and is an extension of the TLS protocol. It indicates which hostname is being contacted by the browser at the beginning of the 'handshake' process. This technology allows a server to connect multiple SSL Certificates to one IP address and gate"
<mikeyg1234> it was a simple fix, i just had to specifiy the domain www.showroomhq.com in the SNI field of that script
mikeyg1234 has quit [Quit: Page closed]
_aeris_ has quit [Remote host closed the connection]
_aeris_ has joined #ruby
<zenspider> but you left... so whatever
pr0ton has quit [Quit: pr0ton]
lxsameer has quit [Ping timeout: 240 seconds]
<zenspider> (3.3x faster)
chouhoulis has quit [Ping timeout: 244 seconds]
darix has joined #ruby
^mtkd has quit []
miguel has joined #ruby
miguel is now known as Guest95307
<Guest95307> Test
lxsameer has joined #ruby
Guest95307 has quit [Client Quit]
psychicist__ has quit [Ping timeout: 240 seconds]
blackmesa has joined #ruby
erratic has quit [Ping timeout: 256 seconds]
willthechill has quit [Ping timeout: 245 seconds]
al2o3-cr has quit [Ping timeout: 240 seconds]
jamesaxl has quit [Quit: WeeChat 2.1]
sameerynho has quit [Ping timeout: 244 seconds]
beefjoe has quit [Remote host closed the connection]
alfiemax has joined #ruby
jrafanie has quit [Ping timeout: 264 seconds]
jhack has joined #ruby
alfiemax has quit [Ping timeout: 244 seconds]
jhack has quit [Client Quit]
jhack has joined #ruby
mynameisdebian has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
tvw has quit []
codymj has quit [Quit: Leaving]
blackmesa has joined #ruby
mcritchlow has quit [Quit: Leaving]
ellcs has joined #ruby
lxsameer has quit [Ping timeout: 264 seconds]
jasmith has joined #ruby
lxsameer has joined #ruby
eckhardt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
eckhardt_ has joined #ruby
ellcs has quit [Ping timeout: 265 seconds]
eckhardt_ has quit [Client Quit]
jasmith has quit [Ping timeout: 244 seconds]
nicht has joined #ruby
pr0ton has joined #ruby
lxsameer has quit [Ping timeout: 244 seconds]
lxsameer has joined #ruby
donofrio_ has joined #ruby
Pupeno_ has joined #ruby
apeiros__ has joined #ruby
fluxAeon has quit [Read error: Connection reset by peer]
jhack_ has joined #ruby
Tempesta_ has joined #ruby
mozzarel1 has joined #ruby
jwheare has quit [Ping timeout: 240 seconds]
rjungemann has quit [Ping timeout: 240 seconds]
SirFunk has quit [Quit: ZNC - http://znc.in]
pelegreno has quit [Ping timeout: 260 seconds]
SirFunk has joined #ruby
arooni has quit [Excess Flood]
pelegreno has joined #ruby
graphene has quit [Ping timeout: 260 seconds]
kujira has quit [Ping timeout: 260 seconds]
apeiros has quit [Ping timeout: 240 seconds]
Azure has quit [Ping timeout: 240 seconds]
donofrio has quit [Ping timeout: 240 seconds]
Pupeno has quit [Ping timeout: 240 seconds]
mozzarella has quit [Ping timeout: 260 seconds]
ianmalcolm has quit [Ping timeout: 260 seconds]
mozzarel1 is now known as mozzarella
blackmesa has quit [Ping timeout: 240 seconds]
jhack has quit [Ping timeout: 240 seconds]
jhack_ is now known as jhack
Xiti has quit [Quit: Xiti]
fluxAeo__ has joined #ruby
arooni has joined #ruby
rjungemann has joined #ruby
Tempesta has quit [Ping timeout: 260 seconds]
Azure has joined #ruby
jwheare has joined #ruby
ianmalcolm has joined #ruby
ren0v0 has quit [Ping timeout: 260 seconds]
ren0v0 has joined #ruby
kujira has joined #ruby
kujira is now known as Guest85563
blackmesa has joined #ruby
lxsameer has quit [Ping timeout: 240 seconds]
orbyt_ has joined #ruby
mynameisdebian has quit [Remote host closed the connection]
lxsameer has joined #ruby
Xiti has joined #ruby
DTZUZU has joined #ruby
shinnya has joined #ruby
mynameisdebian has joined #ruby
willthechill has joined #ruby
mikeiniowa has joined #ruby
voker57 has quit [Remote host closed the connection]