I set up a cron job in my schedule.rb which just executes a custom rake file. Here is my schedule.rb:
set :environment , :development
every 2.minutes do
rake "runpy" , :output => {:error => "/home/aditya9509/Desktop/rubystack-2.0.0-33/projects/myApp/log/error.log" , :standard => "/home/aditya9509/Desktop/rubystack-2.0.0-33/projects/myApp/log/cron.log"}
end
Note that runpy is a custom rake file and it works fine when ran from the terminal using the command:
rake runpy
I have set standard output to cron.log and error output to error.log When running the cron job, there is no error printed in error.log but the following in cron .log:
In Gemfile:
rails (= 4.2.4) depends on
bundler (< 2.0, >= 1.3.0)
Current Bundler version:
bundler (1.0.15)
So i checked the current bundler version using the command
bundler --version
which outputs
Bundler version 1.11.2
Further, I thought I would check for the list of available bundlers so that I can uninstall the 1.0.15 version used by the cron so that it automatically uses the 1.11.2 version. I ran the following command:
gem list | grep "bundler"
To my surprise, the 1.0.15 version being used by cron is not installed on my system. Here was the output of the above command:
bundler (1.11.2, 1.3.6)
hoe-bundler (1.2.0)
Do you know what is going on? I am not sure as to what information would be relevant so let me know, I shall update my question accordingly. I am using the whenever gem to set up a cron job.