adam12 changed the topic of #ruby to: Rules: https://ruby-community.com | Ruby 3.1.2, 3.0.4, 2.7.6: https://www.ruby-lang.org | Paste 4+ lines to: https://gist.github.com | Books: https://goo.gl/wpGhoQ | Logs: https://libera.irclog.whitequark.org/ruby/
<_73> I am not a Ruby programmer, but I am tasked with fixing up a Ruby program. I need to write a rspec test that ensures a method outputs to STDOUT. How can I capture the STDOUT output that is produced when I invoke the method?
Rounin has quit [Ping timeout: 272 seconds]
crax23 has joined #ruby
<adam12> _73: There's an expectation that checks for output to stdout I think. expect { something }.to.output_to_stdout or something.
<_73> Oh nice that is convenient
cartdrige has quit [Ping timeout: 240 seconds]
grokify has joined #ruby
grokify has quit [Ping timeout: 250 seconds]
Y05hito__ has joined #ruby
cartdrige has joined #ruby
crax23 has quit [Ping timeout: 272 seconds]
Y05hito__ has quit [Ping timeout: 255 seconds]
Laplace has quit [Quit: Connection closed for inactivity]
galtgendo has left #ruby [#ruby]
John_Ivan_ has quit [Remote host closed the connection]
John_Ivan_ has joined #ruby
crax23 has joined #ruby
Y05hito__ has joined #ruby
cartdrige has quit [Ping timeout: 272 seconds]
crax23 has quit [Ping timeout: 240 seconds]
grokify has joined #ruby
grokify has quit [Ping timeout: 272 seconds]
reset has quit [Quit: reset]
bougyman_ is now known as bougyman
cartdrige has joined #ruby
Y05hito__ has quit [Ping timeout: 250 seconds]
Guest97 has quit [Quit: Client closed]
Aminda has quit [Ping timeout: 258 seconds]
cartdrige has quit [Ping timeout: 240 seconds]
Aminda has joined #ruby
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
grokify has joined #ruby
grokify has quit [Ping timeout: 240 seconds]
aeris has quit [Remote host closed the connection]
aeris has joined #ruby
ssh0732 has quit [Ping timeout: 258 seconds]
aeris has quit [Remote host closed the connection]
aeris has joined #ruby
John_Ivan_ has quit [Ping timeout: 246 seconds]
grokify has joined #ruby
rndChars has quit [Ping timeout: 250 seconds]
grokify has quit [Ping timeout: 272 seconds]
grokify has joined #ruby
grokify has quit [Remote host closed the connection]
D_A_N has quit [Ping timeout: 240 seconds]
D_A_N has joined #ruby
grokify has joined #ruby
grokify has quit [Remote host closed the connection]
trillp has joined #ruby
ur5us has quit [Ping timeout: 272 seconds]
rvalue has quit [Read error: Connection reset by peer]
rvalue has joined #ruby
polishdub has quit [Ping timeout: 260 seconds]
jpn has joined #ruby
cartdrige has joined #ruby
D_A_N has quit [Quit: leaving]
ur5us has joined #ruby
crax23 has joined #ruby
cartdrige has quit [Ping timeout: 272 seconds]
kerunaru has joined #ruby
kerunaru has quit [Remote host closed the connection]
teclator has joined #ruby
wand has quit [Ping timeout: 258 seconds]
kerunaru has joined #ruby
ur5us has quit [Ping timeout: 272 seconds]
kerunaru has quit [Read error: Connection reset by peer]
jpn has quit [Ping timeout: 272 seconds]
jpn has joined #ruby
Y05hito__ has joined #ruby
crax23 has quit [Ping timeout: 272 seconds]
crax23 has joined #ruby
plujon has quit [Ping timeout: 272 seconds]
Y05hito__ has quit [Ping timeout: 252 seconds]
crax23 has quit [Remote host closed the connection]
jpn has quit [Ping timeout: 272 seconds]
Rounin has joined #ruby
Rounin has quit [Changing host]
Rounin has joined #ruby
kerunaru has joined #ruby
trillp has quit [Quit: WeeChat 3.7]
wand has joined #ruby
jpn has joined #ruby
ur5us has joined #ruby
TomyWork has joined #ruby
jvalleroy has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
jvalleroy has joined #ruby
kerunaru has quit [Ping timeout: 250 seconds]
kerunaru has joined #ruby
kerunaru has quit [Ping timeout: 250 seconds]
kerunaru has joined #ruby
trillp has joined #ruby
ur5us has quit [Ping timeout: 260 seconds]
otisolsen70 has joined #ruby
tankf33der has joined #ruby
perrierjouet has quit [Quit: WeeChat 3.7.1]
jpn has quit [Ping timeout: 276 seconds]
perrierjouet has joined #ruby
jpn has joined #ruby
kerunaru has quit [Ping timeout: 272 seconds]
kerunaru has joined #ruby
kerunaru has quit [Ping timeout: 272 seconds]
kerunaru has joined #ruby
dionysus69 has joined #ruby
reset has joined #ruby
aeris has quit [Ping timeout: 258 seconds]
hightower2 has joined #ruby
aeris has joined #ruby
some14u has joined #ruby
some14u has quit [Client Quit]
_aeris_ has joined #ruby
aeris has quit [Ping timeout: 258 seconds]
_aeris_ is now known as aeris
Sankalp has quit [Ping timeout: 240 seconds]
Sankalp has joined #ruby
markong has joined #ruby
rndChars has joined #ruby
cartdrige has joined #ruby
John_Ivan_ has joined #ruby
grokify has joined #ruby
D_A_N has joined #ruby
grokify has quit [Ping timeout: 250 seconds]
aeris has quit [Remote host closed the connection]
aeris has joined #ruby
rvalue has quit [Read error: Connection reset by peer]
rvalue has joined #ruby
some14u has joined #ruby
some14u has quit [Client Quit]
some14u has joined #ruby
dionysus69 has quit [Ping timeout: 252 seconds]
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
crax23 has joined #ruby
eddof13 has joined #ruby
cartdrige has quit [Ping timeout: 250 seconds]
some14u has joined #ruby
cocalero_ has joined #ruby
cocalero_ has quit [Client Quit]
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
grokify has joined #ruby
eddof13 has joined #ruby
grokify has quit [Ping timeout: 250 seconds]
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Goodbye_Vincent has quit [Quit: Ping timeout (120 seconds)]
some14u has joined #ruby
Goodbye_Vincent has joined #ruby
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
grokify has joined #ruby
grokify has quit [Ping timeout: 250 seconds]
Y05hito__ has joined #ruby
crax23 has quit [Ping timeout: 250 seconds]
kerunaru has quit [Remote host closed the connection]
polishdub has joined #ruby
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Y05hito__ has quit [Ping timeout: 250 seconds]
grokify has joined #ruby
grokify has quit [Remote host closed the connection]
grokify has joined #ruby
grokify has quit [Ping timeout: 272 seconds]
eddof13 has joined #ruby
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
eddof13 has joined #ruby
walez has joined #ruby
trillp has left #ruby [#ruby]
joto has quit [Ping timeout: 272 seconds]
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
grokify has joined #ruby
grokify has quit [Remote host closed the connection]
victori has quit [Quit: ZNC 1.8.2 - https://znc.in]
victori has joined #ruby
grokify has joined #ruby
grokify has quit [Remote host closed the connection]
<adam12> 4.74% cache hit rate for gemdocs.org. I might punt on the CDN.
dionysus69 has joined #ruby
NightMonkey has joined #ruby
grokify has joined #ruby
grokify has quit [Remote host closed the connection]
grokify has joined #ruby
rndChars has quit [Remote host closed the connection]
Pixi` has joined #ruby
D_A_N has quit [Ping timeout: 260 seconds]
D_A_N has joined #ruby
Pixi has quit [Ping timeout: 260 seconds]
cartdrige has joined #ruby
crax23 has joined #ruby
Y05hito__ has joined #ruby
cartdrige has quit [Ping timeout: 240 seconds]
crax23 has quit [Ping timeout: 260 seconds]
grokify has quit [Remote host closed the connection]
TomyWork has quit [Remote host closed the connection]
georgemp has left #ruby [WeeChat 3.7]
grokify has joined #ruby
crax23 has joined #ruby
grokify has quit [Remote host closed the connection]
cartdrige has joined #ruby
Y05hito__ has quit [Ping timeout: 260 seconds]
grokify has joined #ruby
crax23 has quit [Ping timeout: 260 seconds]
crax23 has joined #ruby
cartdrige has quit [Ping timeout: 246 seconds]
grokify has quit [Remote host closed the connection]
markong has quit [Ping timeout: 260 seconds]
_ht has joined #ruby
grokify has joined #ruby
grokify has quit [Remote host closed the connection]
cartdrige has joined #ruby
crax23 has quit [Ping timeout: 276 seconds]
grokify has joined #ruby
ssh0732 has joined #ruby
walez has quit [Ping timeout: 240 seconds]
Sankalp has quit [Ping timeout: 252 seconds]
some14u has joined #ruby
grokify has quit [Remote host closed the connection]
Sankalp has joined #ruby
grokify has joined #ruby
depesz has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
eron has joined #ruby
grokify has quit [Remote host closed the connection]
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
some14u has joined #ruby
walez has joined #ruby
cartdrige has quit [Quit: Leaving]
walez has quit [Quit: Leaving]
cartdrige has joined #ruby
crax23 has joined #ruby
grokify has joined #ruby
hightower2 has quit [Remote host closed the connection]
grokify has quit [Remote host closed the connection]
cartdrige has quit [Ping timeout: 250 seconds]
cartdrige has joined #ruby
crax23 has quit [Ping timeout: 250 seconds]
crax23 has joined #ruby
cartdrige has quit [Ping timeout: 272 seconds]
wand has quit [Ping timeout: 258 seconds]
Y05hito__ has joined #ruby
crax23 has quit [Ping timeout: 246 seconds]
grokify has joined #ruby
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gnafu has joined #ruby
some14u has joined #ruby
some14u has quit [Client Quit]
some14u has joined #ruby
Y05hito__ has quit [Ping timeout: 250 seconds]
grokify has quit [Ping timeout: 272 seconds]
_ht has quit [Quit: _ht]
<gnafu> I'm hoping to get some insight into running a script with `bundle` in a systemd user service. The command runs fine in the project folder, but starting the systemd service fails with an error.
<gnafu> This is the systemd service file: https://paste.centos.org/view/051f701d
<gnafu> And this is the resulting error: https://paste.centos.org/view/17e75c70
<adam12> gnafu: `ruby -v` from the working location
<adam12> gnafu: also, `which ruby`
<gnafu> adam12: ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x86_64-linux]
<gnafu> adam12: /usr/bin/ruby
<gnafu> As far as I can tell, PATH is the same for both my login shell and my systemd user environment (`printenv` vs. `systemctl --user show-environment`).
<gnafu> And this is the specific project I'm trying to use: https://git.singpolyma.net/mam_backup
<adam12> gnafu: Instead of calling bundle directly, what happens if you do `bash -lc "..your execstart here"`
<gnafu> (And the error is the same whether I use "/home/gideon/Projects/mam_backup" or "%h/Projects/mam_backup" for WorkingDirectory.)
grokify has joined #ruby
<gnafu> adam12: Aah, let me try that :-).
ur5us has joined #ruby
grokify has quit [Ping timeout: 250 seconds]
<gnafu> adam12: Hey, I think that worked! At least, it didn't error out. However, it seems to have overwritten the .xml file with a blank file...
<gnafu> Wait, no: silly me, I was looking at the wrong file ^^;.
<adam12> Did it work then?
<adam12> ^ gnafu
<gnafu> adam12: Yes, it did :-D. Whoop!
<adam12> gnafu: Nice. Does it work without the `-l` (so just `-c`)?
<gnafu> adam12: Then the next question is: Is that the most appropriate way to do that, or is there a more "systemd way" to tell it to run in a login shell?
<gnafu> adam12: Let me try that...
<adam12> gnafu: I'm not sure tbh. systemd is a mystery to me :) running without `-l` would be ideal.. but atleast we're not using `-i` :P
<gnafu> It does run with just `-c`.
wand has joined #ruby
<adam12> Cool.
<gnafu> adam12: Thank you so much. I'll do some more digging to see if I should do something in the unit file instead of calling bash like that, but at least this works for now ^^.
<adam12> gnafu: No problem :)
eddof13 has joined #ruby
<gnafu> I've never used Ruby before ^^;. I'm working on moving all my phone usage over to JMP (jmp.chat) and that uses XMPP. The JMP developers seem to like Ruby :-).
<adam12> gnafu: Cool. Ruby is awesome.
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
some14u has joined #ruby
eron has quit [Quit: Client closed]
<gnafu> I'm not seeing anything more appropriate that `bash -c` yet, and I actually see some systemd documentation recommending using `sh -c` for running shell commands, so I'm going to leave it.
<gnafu> adam12: Thanks again!
<adam12> gnafu: yw!
teclator has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
cartdrige has joined #ruby
crax23 has joined #ruby
cartdrige has quit [Ping timeout: 260 seconds]
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Y05hito__ has joined #ruby
crax23 has quit [Ping timeout: 260 seconds]
cartdrige has joined #ruby
Y05hito__ has quit [Ping timeout: 272 seconds]
otisolsen70 has quit [Quit: Leaving]
crax23 has joined #ruby
grokify has joined #ruby
cartdrige has quit [Ping timeout: 250 seconds]
Y05hito__ has joined #ruby
crax23 has quit [Ping timeout: 250 seconds]
grokify has quit [Remote host closed the connection]
Y05hito__ has quit [Ping timeout: 250 seconds]
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
quintasan has quit []
quintasan has joined #ruby
cahoots has joined #ruby
<cahoots> hi, if i start a thread with "Thread.new ..." but don't store it anywhere, is it at risk of deallocation before it finishes?
gonix has joined #ruby
quintasan has quit []
quintasan has joined #ruby
grokify has joined #ruby
grokify has quit [Ping timeout: 252 seconds]
markong has joined #ruby
eddof13 has joined #ruby
eddof13 has quit [Read error: Connection reset by peer]
grokify has joined #ruby
dionysus69 has quit [Read error: Connection reset by peer]
quintasan has quit []
dionysus69 has joined #ruby
quintasan has joined #ruby
grokify has quit [Remote host closed the connection]
John_Ivan__ has joined #ruby
John_Ivan_ has quit [Read error: Connection reset by peer]
Rounin has quit [Ping timeout: 240 seconds]
gonix has quit [Ping timeout: 260 seconds]
cartdrige has joined #ruby
cahoots has quit [Ping timeout: 240 seconds]