cocalero has quit [Quit: Going offline, see ya! (www.adiirc.com)]
ur5us has quit [Ping timeout: 244 seconds]
ur5us has joined #ruby
m-antis has quit [Quit: Leaving]
Guimauve has joined #ruby
ur5us has quit [Ping timeout: 244 seconds]
m-antis has joined #ruby
m-antis has quit [Ping timeout: 268 seconds]
nirvdrum has quit [Quit: nirvdrum]
Al2O3 has quit [Quit: I'm quitting, thanks for all the sharks.]
Al2O3 has joined #ruby
giorgian has joined #ruby
<brand1>
Anyone know what im doing wrong here I'm trying to run ruby as another user under systemd, i can run it as that user interactively but when i try to put it in a unit file, it give me an error:
<brand1>
from <internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:85:in `require'
giorgian has quit [Ping timeout: 252 seconds]
<brand1>
i've installed the gem for that specific user only (and like i say it works interactively) also i've tried manually specifying the entire path to the gem but still no change
<brand1>
the only gem required is webrick
<Guimauve>
my guess is that systemd isn't setting up your environment because it's running the app directly instead of via your shell (which will load your rc files, set environment variables, dick with the PATH, etc, etc)
<Guimauve>
oh, and it might need to be a login shell to work the same way as your interactive shell depending on how you set up your local install, which you might not want.
<brand1>
that sounds about right it works when i run it as the user manually but in the unit file it must not be loading a path variable or something idk
<brand1>
i manually installed the gem as the user thinking that was the problem and i pointed the require file to the specific file path just to see but that didnt change the error
<Guimauve>
brand1 - for giggles, try to bash --login -- <full path to ruby> <your shit here>
<brand1>
trying to stick to kiss so dont understand what bundler does or all the extra commands are a about i just downloaded this simple script file and was trying to get it to run as a service
<Guimauve>
whatever you are attempting to do that is not working, switch your command from `ruby script.rb etc etc` to have bash instead load a login shell and exec your actual command. that way the shell will load your .profile and .bashrc before running ruby
<Guimauve>
which you do (the lazy way) via `bash --login -- <command>`
<brand1>
keeps on complaining when trying to load the require file which ive specified with and wthout path works both ways as user manually
<brand1>
also if i do a helloworld "put" it works no problem at least the service doesnt error out anyway so at least its ok to that point
<Guimauve>
that's... odd. forcing a login shell would set up your environment exactly the same as it would be for an interactive shell.
<brand1>
sadly i dont have much experience with any of it, ruby or fedora 36 haven't really used it since fedora core 4 i think it was like 20 years ago but that doesn't mean i cant learn in theory i guess anyway
<brand1>
the errors are terrible it doesnt tell you anything about why it cant do it
fercell has quit [Ping timeout: 260 seconds]
<Guimauve>
brand1 - for debugging, log the $LOAD_PATH and Dir.getwd to see if they are significantly different?
<brand1>
Guimauve: hmm this may be helpful is it running as root still?
<brand1>
sadness in case you didnt know, linux is case sensitive, systemd needs User= and Group=
<Guimauve>
lol, the entire issue was a case sensitivity typo?
<Guimauve>
fun times
<brand1>
apparently was dir.wd outputted / so was like wth
* brand1
thinks about all the other things he could have learned in 5 days...
<Guimauve>
well, at least you got it figured out. =]
<Guimauve>
heh
<Guimauve>
but think of the adventure you had along the way!
<brand1>
yes otherwise would never have known the actual exact number of popcorn kernels on my ceiling
<brand1>
who needs all that caffeine anyway
<Guimauve>
I just got back into ruby after being away for more than 5 years. that's also frustrating, trust me. a lot of my expectations have become wrong, and it's been so long that I never saw the changelog entry explaining why. i'm not about to read 5 years of changelogs.