title: Capistrano Multistage deploying to wrong directory
body: <p>Im having some problems with my capistrano setup after updating my gems lately. I have a multistage setup with a production and staging setup.</p>
  
  <p>/config/deploy.rb</p>
  
  <pre><code># setup multistage
  set :stages, %w(testing production)
  set :default_stage, "testing"
  require 'capistrano/ext/multistage'
  </code></pre>
  
  <p>/config/deploy/production.rb</p>
  
  <pre><code># Set deploy path
  set :deploy_to, "/var/www/mysite/live"
  set :rails_env, "production"
  </code></pre>
  
  <p>/config/deploy/testing.rb</p>
  
  <pre><code># Set deploy path
  set :deploy_to, "/var/www/mysite/test"
  set :rails_env, "test"
  </code></pre>
  
  <p>Problem is that it seems to ignore my deploy_to setting. It just deploys to the default /u/apps/mysite.</p>
  
  <p>I don't know if it has any relevance, the cause of all of this is a move from apache+passenger to nginx+unicorn. I don't think it has anything to do with that though, as this is just the checkout process.</p>