Could you explain me this God script?

109 views
Skip to first unread message

Alfredo Motta

unread,
Feb 11, 2015, 7:05:29 PM2/11/15
to god...@googlegroups.com
Hello everyone,

I have a plain Ruby app that needs some Resque workers in the background.

To monitor the workers I installed god for the root user (because I was not able to do differently).
This is the god script that monitors the workers.

My source of confusion is the following. I now have two ruby environments:
/root/.rbenv/
and
/home/my_user/.rbenv

Under the rbenv of my_user I have the resque gem
/home/my_user/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/resque-1.25.2/

But under the rbenv of root I don't
ls .rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/
bundler-1.8.0/      god-0.13.5/         minitest-5.4.3/     power_assert-0.2.2/ rake-10.4.2/        rdoc-4.2.0/         test-unit-3.0.8/

What happens when I run bundle exec in the god script ?
Which ruby environment is loaded ?
I was expecting this script to fail, but it's actually working and I don't understand how it's possible.

Thank you for your help,
please let me know if I can provide more informations to clarify my doubt.

Reply all
Reply to author
Forward
0 new messages