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