I am not sure why this is, but I have phantomjs installed on my server
$which phantomjs
/usr/local/bin/phantomjs
and am running a script from crontab as:
0 */5 * * * /home/roy/.rbenv/shims/ruby /home/roy/SCRIPT/lib/SCRIPT.rb
if I just run the exact command from the command line, it will run.
But if it runs from the cronjob, I get:
/home/roy/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cliver-0.3.2/lib/cliver/dependency.rb:143:in
`raise_not_found!': Could not find an executable ["phantomjs"] on your path. (Cliver::Dependency::NotFound)
I've already seen this in possible duplicate Could not find phantomjs, but even if installed, it still does not appear to be working from cron.
Is there any way to check where this might be going wrong? Just for background this has been working as is for about a month, but broke when I tried to update from phantomjs 2.0.0 to phantomjs 2.1.1.