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…]
<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)
<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
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>
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_>
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…]
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
<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
<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
<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)
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."
<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
<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)
<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.
<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]
<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.
<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:
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]