I am trying to deploy a Django project with Capistrano. Capistrano deploys the code to my server and finishes deploy steps.
But when I try add a custom task like this...
task :collect_static do
on roles(:app) do |host|
execute "cd #{release_path}/myproject"
execute "workon myproject"
execute "./manage.py collectstatic"
end
end
after "deploy:updated", "collect_static"
It throws the following error...
02 bash: workon: command not found
After the deploy, if I SSH manually onto server and run workon command it works fine(same user). Just Capistrano doesn't recognise it?