# Execute cap deploy:migrations fails

**URL:** <https://www.ruby-forum.com/t/execute-cap-deploy-migrations-fails/160349>\
**Category:** Rails\
**Created:** [February 15, 2009, 2:52am UTC](https://www.ruby-forum.com/t/execute-cap-deploy-migrations-fails/160349 "2009-02-15T02:52:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![olivierntk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/85e7bf/32.png) [@olivierntk](https://www.ruby-forum.com/u/olivierntk)\
**Post date:** [February 15, 2009, 2:52am UTC](https://www.ruby-forum.com/t/execute-cap-deploy-migrations-fails/160349/1 "2009-02-15T02:52:48Z")

</div>

Hi there, I am trying to deploy a rails app on dreamhost.

Here is the error message that I get:

fatal: ‘home/USER\_NAME/DOMAIN\_NAME/git/APPLICATION\_NAME.git’: unable  
to chdir or not a git archive  
fatal: The remote end hung up unexpectedly  
/Users/USER/.gem/ruby/1.8/gems/capistrano-2.5.3/lib/capistrano/recipes/  
deploy/scm/git.rb:224:in `query\_revision’: Unable to resolve revision  
for ‘master’ on repository

I am using Capistrano v2.5.3, Rails 2.2 and Git v1.6

I ran deploy:setup and deploy:check successfully. I get the following  
message when I run deploy:check command “You appear to have all  
necessary dependencies installed”.

Here is my deploy script

default\_run\_options[:pty] = true

# be sure to change these

set :user, ‘USER\_NAME’  
set :domain, ‘DOMAIN\_NAME’  
set :application, ‘APP\_NAME’

# the rest should be good

set :repository, “#{user}@#{domain}:home/#{user}/#{domain}/git/#  
{application}.git”  
set :deploy\_to, “/home/#{user}/#{domain}”  
set :deploy\_via, :remote\_cache  
set :scm, ‘git’  
set :branch, ‘master’  
set :git\_shallow\_clone, 1  
set :scm\_verbose, true  
set :use\_sudo, false

server domain, :app, :web  
role :db, domain, :primary =\> true

namespace :deploy do  
task :restart do  
run “touch #{current\_path}/tmp/restart.txt”  
end  
end

I am guessing my path to my git repository is incorrect but I checked  
many … many times and this is my path on my host.

Any help would be greatly appreciated, thank you

Olivier

---

<div class="post-metadata">

**Author:** ![olivierntk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/85e7bf/32.png) [@olivierntk](https://www.ruby-forum.com/u/olivierntk)\
**Post date:** [February 15, 2009, 5:14am UTC](https://www.ruby-forum.com/t/execute-cap-deploy-migrations-fails/160349/2 "2009-02-15T05:14:53Z")

</div>

Try to remove the “set :deploy\_via, :remote\_cache”, could never get it  
to work.

- 

Maurício Linhares  
[http://alinhavado.wordpress.com/](http://alinhavado.wordpress.com/) (pt-br) | [http://blog.codevader.com/](http://blog.codevader.com/)  
(en)

---

<div class="post-metadata">

**Author:** ![olivierntk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/85e7bf/32.png) [@olivierntk](https://www.ruby-forum.com/u/olivierntk)\
**Post date:** [February 15, 2009, 5:29am UTC](https://www.ruby-forum.com/t/execute-cap-deploy-migrations-fails/160349/3 "2009-02-15T05:29:29Z")

</div>

Looking at the print from capistrano:

fatal: ‘home/USER\_NAME/DOMAIN\_NAME/git/APPLICATION\_NAME.git’:  
unable ???

That just does not look right.

From the host where you have capistrano are you able to run git clone  
and the git url ?

Here is a git example url

set :repository, “removed\_email\_address@domain.invalid:username/projectname.git”
