/srv/irclogs.ubuntu.com/2016/01/08/#upstart.txt

m1dnight_I have an upstart script that needs to use rbenv to use ruby 2.3.0. But I can't seem to get it configured.17:44
m1dnight_https://www.refheap.com/11345617:45
m1dnight_any ideas?17:45
m1dnight_Ive really tried a lot.17:45
JanCwhat did you do to debug?  how does it fail?17:58
JanCm1dnight_: ^^^18:04
m1dnight_First of all I have made sure that rbenv works properly when logged in. So testing the application (a node app) in my login schell works fine.18:05
m1dnight_now i was testing if the env works when i run it without upstart18:05
m1dnight_sec pls18:05
m1dnight_so `export FOO="bar"` makes the value available in the script18:07
m1dnight_(the script is run by a node.js application which is in turn run by the upstart)18:07
JanCthis doesn't run like a login shell, so AFAIK $HOME won't be set to ~cdetroye etc.18:07
m1dnight_hmm setting the home var breaks gulp18:09
JanCand it seems like rbenv needs to find stuff in $HOME ?18:09
JanC(I don't really use Ruby)18:09
m1dnight_neither do I. Its for jekyll.18:09
JanCit doesn't work with whatever is the system-installed ruby?18:10
JanCalso, if I understand correctly, it's gulp that runs the ruby script at some later time?18:11
m1dnight_no. gulp runs the node.js app.18:12
m1dnight_and from within node, i call a bash script which builds a jekyll website.18:12
m1dnight_so upstart( gulp ( node (bash)))18:12
m1dnight_if that conveys it properly18:12
JanCso you really need to set the rbenv environment in that bash script, I think18:13
JanCseems like you can set the environment with a local configuration file too18:14
m1dnight_yeah I tried that but it doesnt get read18:14
m1dnight_so my guess is that rbenv is not being run properly.18:14
m1dnight_the quest is still ongoing18:14
JanCI'd say, if gulp runs de node.js app, then the bug is likely not in your upstart script18:15
JanC(even if I think sourcing .zshrc there doesn't seem like a good idea)18:16
JanCunless you have zsh as /bin/sh ?18:17
JanCstupid question: do you really need a node.js process to run that as a hook?18:25
m1dnight_JanC: yeah I think so.18:28
m1dnight_hmm18:28
m1dnight_When I add $HOME it breaks gulp and node.18:28
m1dnight_Is that normal?18:28
m1dnight_and they are even isntalled in /usr/bin/18:28
m1dnight_is there another name for upstart?18:44
m1dnight_to google a bit more18:44
m1dnight_woohoo I fixed it18:45
m1dnight_<318:45
JanCI think most of what you need would be in the cookbook18:46

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!