How to run a Ruby script using rbenv with cron
I’ve found a solution to load rbenv. Either with a loader importing rbenv to the PATH : */1 * * * * /bin/bash -c ‘. $HOME/.rbenv/loader.sh ; cd /data/app/; ruby -v’ The ‘.’ before ‘$HOME/.rbenv/loader.sh’ is important, it runs the script in the current shell Or without loader, which is better : */1 * * … Read more