{"action":"closed","issue":{"url":"https://api.github.com/repos/xuwupeng2000/capistrano-scm-gitcopy/issues/22","repository_url":"https://api.github.com/repos/xuwupeng2000/capistrano-scm-gitcopy","labels_url":"https://api.github.com/repos/xuwupeng2000/capistrano-scm-gitcopy/issues/22/labels{/name}","comments_url":"https://api.github.com/repos/xuwupeng2000/capistrano-scm-gitcopy/issues/22/comments","events_url":"https://api.github.com/repos/xuwupeng2000/capistrano-scm-gitcopy/issues/22/events","html_url":"https://github.com/xuwupeng2000/capistrano-scm-gitcopy/issues/22","id":78670965,"number":22,"title":"gitcopy doesn't work with capistrano-rvm","user":{"login":"kbeckman","id":782327,"avatar_url":"https://avatars.githubusercontent.com/u/782327?v=3","gravatar_id":"","url":"https://api.github.com/users/kbeckman","html_url":"https://github.com/kbeckman","followers_url":"https://api.github.com/users/kbeckman/followers","following_url":"https://api.github.com/users/kbeckman/following{/other_user}","gists_url":"https://api.github.com/users/kbeckman/gists{/gist_id}","starred_url":"https://api.github.com/users/kbeckman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kbeckman/subscriptions","organizations_url":"https://api.github.com/users/kbeckman/orgs","repos_url":"https://api.github.com/users/kbeckman/repos","events_url":"https://api.github.com/users/kbeckman/events{/privacy}","received_events_url":"https://api.github.com/users/kbeckman/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-05-20T19:50:32Z","updated_at":"2016-03-31T10:44:12Z","closed_at":"2016-03-31T10:44:12Z","body":"[This line of code](https://github.com/xuwupeng2000/capsitrano-scm-gitcopy/blob/master/lib/capistrano/tasks/gitcopy.rake#L30) is the issue...\r\n\r\nSince this gem is using `capture` instead of `execute :ruby, '--args'` capistrano-rvm cannot plug in the `rvm:hook` task for this command. I spent a lot of time troubleshooting this one and took a lot of wrong turns trying to get Cap3 to work with a login shell, trying to rewrite the `gitcopy:deploy` task to include the `rvm:hook` among others... Once I finally figured out how capistrano-rvm was [injecting the call to RVM](https://github.com/capistrano/rvm/blob/master/lib/capistrano/tasks/rvm.rake#L41) the solution was an easy one.\r\n\r\nIf you have any questions, please let me know... I'll be submitting a pull request shortly."}}