I have geckodriver installed in the usr/local/bin
directory and exported to the $PATH variable.
export PATH=$PATH:~/usr/local/bin/geckodriver
You can see usr/local/bin
is in my $PATH
root/.rbenv/plugins/ruby-build/bin:/root/.rbenv/shims:/root/.rbenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
However, I run the ruby script by cronjob I get the following error message: Unable to find Mozilla geckodriver.
My Cronjob
*/20 * * * * ~/.rbenv/bin/rbenv exec ruby /home/path/to/the/ruby/script/report_export.rb
I start the ruby script so it all works. Can someone help me that it also works by cronjob