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

rbenv install –list does not list version 2.1.2

Both rbenv and ruby-build are generally installed from Github by cloning; That’s how the authors recommend we install it. git clone https://github.com/sstephenson/rbenv.git ~/.rbenv git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build If you didn’t do it that way I’d recommend that method. Then, you can simply do: cd ~/.rbenv git pull cd plugins/ruby-build git pull If you have several … Read more