I use whenever a gem on my 2+ year old slice in Slicehost. However, I cannot do the same on my new fragment.
The main differences are that I now run RVM on both my MBP and slice. I also run Rails 3. I have Rubygems v 1.5.0 and the latest versions of RVM, Ruby 1.9.2p136, Capistrano and all other packages there.
I tried a million things, read all the docs, and for now I use whenever gem version 0.6.2. I also covered all questions on relevant topics on SO, as well as on Google.
Here is the code in deploy.rb:
namespace :deploy do ... desc "Update the crontab file" task :update_crontab, :roles => :db do run "cd #{release_path} && whenever --update-crontab #{application}" end end after 'deploy:update_code', 'deploy:update_crontab'
Here is the error message that I get after running 'cap deploy'
failed: "rvm_path=$HOME/.rvm/ $HOME/.rvm/bin/rvm-shell '1.9.2' -c 'cd /home/deploy/public_html/lasource/releases/20110209201551 && /home/deploy/.rvm/gems/ruby-1.9.2-p136/bin/whenever --write-crontab'" on lasource.ohlalaweb.com
Any suggestions would be welcome.
By the way, where are the kapistran magazines?
By adding "bundle exec" thanks to the Simone proposal, I was able to complete the header deployment procedure, as everything went well. However, a new problem is that my crontab file is still empty of tasks and has not created my partition with its 4 tasks.