I'm using Capistrano to deploy a Ruby on Rails app to a VPS running Ubuntu 11.10. However, whenever I run cap:deploy i get this error:

cd: 1: can't cd to /var/www/appname/releases

The VPS I'm using is Linode. Locally, I'm on Mac OS X 10.7.2 Lion.

Also, I'm using git, Passenger and Ngninx, although I don't think it makes a difference, I think it has to do with folder privileges and SSH more than anything.

Here's the deploy.rb

set :user, "name"
set :application, "appname"
set :domain,      "000.000.201.001"
set :repository,  "."
set :use_sudo,    true  
set :deploy_to,   "/var/www/#{application}"
set :scm,         "none"
set :deploy_via, :copy
role :app, domain
role :web, domain
role :db,  domain, :primary => true

namespace :deploy do
  task :start, :roles => :app do
    run "touch #{current_release}/tmp/restart.txt"
end

task :stop, :roles => :app do
  # Do nothing.
end

desc "Restart Application"
task :restart, :roles => :app do
  run "touch #{current_release}/tmp/restart.txt"
end
end
link|improve this question
1  
Do you have to do something like "cap deploy:setup" to create the directory prior to deployment? Can you ssh into the box and see if the directory exists, and verify the permissions are compatible with the user capistrano is using? – cjc Jan 30 at 21:14
that def helped, but now I'm getting this error: find: `/home/omar/apps/appname/releases/20120130213034/public/javascripts': No such file or directory – hagope Jan 30 at 21:32
1  
1. cap deploy:setup 2. cap deploy:cold – kaji Jan 31 at 1:25
#1 works, #2 fails – hagope Jan 31 at 2:50
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.