Created
November 6, 2013 10:26
-
-
Save Archimidis/7333913 to your computer and use it in GitHub Desktop.
Capistrano recipe for remote rake invocation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace :remote_rake do | |
| desc 'Run a task on a remote server.' | |
| # run like: cap remote_rake:invoke task="db:reset" | |
| task :invoke do | |
| run("cd #{deploy_to}/current && bundle exec rake #{ENV['task']} RAILS_ENV=#{rails_env}") | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment