aurels
unread,Oct 27, 2009, 9:50:57 AM10/27/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Whenever Gem
Hi,
I'm trying to use whenever with a multistage setup (staging +
production). Here is my cap task:
namespace :deploy do
desc "Write the crontab file"
task :update_crontab, :roles => :db do
run "cd #{current_path} && whenever --write-crontab #{application}
_#{stage}"
end
end
I've named the task-set according to the app name and the current
stage. The problem is that it always runs in production, even if
staging is the current environment. I.e., aways outputs commands of
this kind:
(cd /.../awsome-app/releases/42 && RAILS_ENV=production /usr/bin/env
rake app:awsome_cron)
Is there a config option or a way to force the RAILS_ENV var to be set
at #{stage} ?
Thanks is advance,
Aurélien