Skip to content

Instantly share code, notes, and snippets.

@abarrak
Last active August 27, 2017 20:33
Show Gist options
  • Select an option

  • Save abarrak/636adfb6e39ad2558b6929aef8a7c30c to your computer and use it in GitHub Desktop.

Select an option

Save abarrak/636adfb6e39ad2558b6929aef8a7c30c to your computer and use it in GitHub Desktop.
Run rake task after capistrano deployment
namespace :system do
desc 'Update the system rules '
task :update_rules do
on roles(:all) do
within release_path do
with rails_env: fetch(:rails_env) do
execute :rake, 'system:update_rules'
end
end
end
end
end
# credits:
# https://coderwall.com/p/doa0mq/running-a-rake-task-during-a-rails-4-deployment-using-capistrano-3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment