title: Capistrano deploy:cold doesn't work
body: <p>I have two Questions. One small and one greater problem.</p>
  
  <ol>
  <li>Why i have to enter the passphrase 10 times my running cap:cold</li>
  <li><p>After i tryed to setup an capistrano via teachmetocode-tuorial and
  with some helps of stackoverflow. I sat down, with many tutorials of deploying capistrano and write my own new Version of the deploy.rb
  Our gem env output looks so</p>
  
  <p>RubyGems Environment:</p>
  
  <ul>
  <li>RUBYGEMS VERSION: 1.8.15
  <ul>
  <li>RUBY VERSION: 1.9.3 (2012-02-16 patchlevel 125) [x86_64-linux]</li>
  <li>INSTALLATION DIRECTORY: /home/user/.rvm/gems/ruby-1.9.3-p125@myapp</li>
  <li>RUBY EXECUTABLE: /home/user/.rvm/rubies/ruby-1.9.3-p125/bin/ruby</li>
  <li>EXECUTABLE DIRECTORY: /home/user/.rvm/gems/ruby-1.9.3-p125@myapp/bin</li>
  <li>RUBYGEMS PLATFORMS:</li>
  <li>ruby</li>
  <li>x86_64-linux</li>
  <li>GEM PATHS:
  <ul>
  <li>/home/user/.rvm/gems/ruby-1.9.3-p125@myapp</li>
  <li>/home/user/.rvm/gems/ruby-1.9.3-p125@global</li>
  </ul></li>
  <li>GEM CONFIGURATION:
  <ul>
  <li>:update_sources => true</li>
  <li>:verbose => true</li>
  <li>:benchmark => false</li>
  <li>:backtrace => false</li>
  <li>:bulk_threshold => 1000</li>
  </ul></li>
  <li>REMOTE SOURCES:
  <ul>
  <li><a href="http://rubygems.org/" rel="nofollow">http://rubygems.org/</a></li>
  </ul></li>
  </ul></li>
  </ul></li>
  </ol>
  
  <p>And our deploy.rb is here</p>
  
  <pre><code>require "bundler/capistrano"
  set :application, "myapp"
  set :repository,  "#{application}@myserver:/home/git/repos/#{application}.git"
  set :scm, :git
  set :user, "#{application}"
  set :use_sudo, false
  set :deploy_to, "/home/#{application}/#{application}"
  set :deploy_via, :remote_cache
  set :keep_releases, 5
  
  server "myserver", :app, :web, :db, :primary =&gt; true
  
  set :branch, "master"
  
  ssh_options[:forward_agent] = false
  default_run_options[:pty] = true
  
  before "deploy:assets:precompile", "bundle:install"
  
  load 'deploy/assets'
  
  namespace :deploy do
   task :start do ; end
   task :stop do ; end
   task :restart, :roles =&gt; :app, :except =&gt; { :no_release =&gt; true } do
     run "touch #{File.join(current_path,'tmp','restart.txt')}"
   end
  end
  </code></pre>
  
  <p>Our Developmentsetup
  We use Apache+Passagner and the rvm installation of <a href="http://beginrescueend.com/rvm/install/" rel="nofollow">http://beginrescueend.com/rvm/install/</a>.
  On the server we install it on the same way. Every User(apps, gemsets or realuser) have to be a member of group rvm... We use modrails to install the passagner...
  <a href="http://www.modrails.com/documentation/Users%20guide%20Apache.html#_installing_via_the_gem" rel="nofollow">http://www.modrails.com/documentation/Users%20guide%20Apache.html#_installing_via_the_gem</a></p>
  
  <p>But why get i an error when i use <code>cap deploy:cold</code>. The <code>cap deploy:check</code> say <code>You appear to have all necessary dependencies installed</code>
  The error is here</p>
  
  <pre><code> triggering after callbacks for `deploy:finalize_update'
    * executing `bundle:install'
    * executing "ls -x /home/myapp/myapp/releases"
      servers: ["myserver"]
      [myserver] executing command
      [myserver] sh -c 'ls -x /home/myapp/myapp/releases'
      command finished in 82ms
    * executing "cd /home/myapp/myapp/releases/20120331143114 &amp;&amp; bundle install --gemfile /home/myapp/myapp/releases/20120331143114/Gemfile --path /home/m
  ahaloo/myapp/shared/bundle --deployment --quiet --without development test"
      servers: ["myserver"]
      [myserver] executing command
      [myserver] sh -c 'cd /home/myapp/myapp/releases/20120331143114 &amp;&amp; bundle install --gemfile /home/myapp/myapp/releases/20120331143114/Gemfile --path /h
  ome/myapp/myapp/shared/bundle --deployment --quiet --without development test'
   ** [out :: myserver] sh: bundle: not found
      command finished in 73ms
  *** [deploy:update_code] rolling back
    * executing "rm -rf /home/myapp/myapp/releases/20120331143114; true"
      servers: ["myserver"]
      [myserver] executing command
      [myserver] sh -c 'rm -rf /home/myapp/myapp/releases/20120331143114; true'
      command finished in 171ms
  failed: "sh -c 'cd /home/myapp/myapp/releases/20120331143114 &amp;&amp; bundle install --gemfile /home/myapp/myapp/releases/20120331143114/Gemfile --path /home/
  myapp/myapp/shared/bundle --deployment --quiet --without development test'" on myserver
  marcus@lenny:~/dev/workspace/myapp$
  </code></pre>
  
  <p>Our <code>bundle list</code> is here</p>
  
  <pre><code> * actionmailer (3.2.0)
   * actionpack (3.2.0)
   * activemodel (3.2.0)
   * activerecord (3.2.0)
   * activeresource (3.2.0)
   * activesupport (3.2.0)
   * arel (3.0.2)
   * builder (3.0.0)
   * bundler (1.1.1)
   * capistrano (2.11.2)
   * coffee-rails (3.2.1)
   * coffee-script (2.2.0)
   * coffee-script-source (1.2.0)
   * erubis (2.7.0)
   * execjs (1.3.0)
   * highline (1.6.11)
   * hike (1.2.1)
   * i18n (0.6.0)
   * journey (1.0.3)
   * jquery-rails (1.0.17)
   * json (1.6.5)
   * libv8 (3.3.10.4)
   * mail (2.4.4)
   * mime-types (1.17.2)
   * multi_json (1.1.0)
   * net-scp (1.0.4)
   * net-sftp (2.0.5)
   * net-ssh (2.3.0)
   * net-ssh-gateway (1.1.0)
   * polyglot (0.3.3)
   * rack (1.4.1)
   * rack-cache (1.2)
   * rack-ssl (1.3.2)
   * rack-test (0.6.1)
   * rails (3.2.0)
   * railties (3.2.0)
   * rake (0.9.2.2)
   * rdoc (3.12)
   * sass (3.1.15)
   * sass-rails (3.2.0)
   * simple_form (2.0.1)
   * sprockets (2.1.2)
   * sqlite3 (1.3.5)
   * therubyracer (0.9.10)
   * thor (0.14.6)
   * tilt (1.3.3)
   * treetop (1.4.10)
   * tzinfo (0.3.32)
   * uglifier (1.2.3)
   * uuidtools (2.1.2)
  </code></pre>
  
  <p>Can someone help us please to get a working capistrano</p>