# New capistrano setup

**URL:** <https://www.ruby-forum.com/t/new-capistrano-setup/131436>\
**Category:** Deployment\
**Created:** [March 10, 2008, 2:06am UTC](https://www.ruby-forum.com/t/new-capistrano-setup/131436 "2008-03-10T02:06:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pavel989](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/48db29/32.png) [@pavel989](https://www.ruby-forum.com/u/pavel989)\
**Post date:** [March 10, 2008, 2:06am UTC](https://www.ruby-forum.com/t/new-capistrano-setup/131436/1 "2008-03-10T02:06:12Z")

</div>

I setup new capistrano using “gem install”. I have this simple script  
that I wrote. Its seems to work fine but then i run a deploy i get all  
these wierd errors about directories and things that i dont even have in  
my configs. Where are they comming from.

cap deploy output:  
[dev:~/cap/config] deploy$ cap deploy

- executing `deploy’
- executing `deploy:update’  
\*\* transaction: start
- executing `deploy:update\_code’
- executing “/opt/csw/bin/svn checkout -q -r1  
svn+ssh://removed\_email\_address@domain.invalid/var/repos/stratplace  
/var/www/html/\_stratplace.com/test/releases/20080310005233 && (echo 1 \>  
/var/www/html/\_stratplace.com/test/releases/20080310005233/REVISION)”  
servers: [“8.12.43.95”]  
[8.12.43.95] executing command  
command finished
- executing `deploy:finalize\_update’
- executing “chmod -R g+w  
/var/www/html/\_stratplace.com/test/releases/20080310005233”  
servers: [“8.12.43.95”]  
[8.12.43.95] executing command  
command finished
- executing “rm -rf  
/var/www/html/\_stratplace.com/test/releases/20080310005233/log  
/var/www/html/\_stratplace.com/test/releases/20080310005233/public/system  
/var/www/html/\_stratplace.com/test/releases/20080310005233/tmp/pids &&\n  
mkdir -p  
/var/www/html/\_stratplace.com/test/releases/20080310005233/public &&\n  
mkdir -p /var/www/html/\_stratplace.com/test/releases/20080310005233/tmp  
&&\n ln -s /var/www/html/\_stratplace.com/test/shared/log  
/var/www/html/\_stratplace.com/test/releases/20080310005233/log &&\n  
ln -s /var/www/html/\_stratplace.com/test/shared/system  
/var/www/html/\_stratplace.com/test/releases/20080310005233/public/system  
&&\n ln -s /var/www/html/\_stratplace.com/test/shared/pids  
/var/www/html/\_stratplace.com/test/releases/20080310005233/tmp/pids”  
servers: [“8.12.43.95”]  
[8.12.43.95] executing command  
command finished
- executing “find  
/var/www/html/\_stratplace.com/test/releases/20080310005233/public/images  
/var/www/html/\_stratplace.com/test/releases/20080310005233/public/stylesheets  
/var/www/html/\_stratplace.com/test/releases/20080310005233/public/javascripts  
-exec touch -t 200803100052.36 {} ‘;’; true”  
servers: [“8.12.43.95”]  
[8.12.43.95] executing command  
\*\*\* [err :: 8.12.43.95] find: stat() error  
/var/www/html/\_stratplace.com/test/releases/20080310005233/public/images:  
No such file or directory  
\*\*\* [err :: 8.12.43.95] find: stat() error  
/var/www/html/\_stratplace.com/test/releases/20080310005233/public/stylesheets:  
No such file or directory  
\*\*\* [err :: 8.12.43.95] find: stat() error  
/var/www/html/\_stratplace.com/test/releases/20080310005233/public/javascripts:  
No such file or directory  
command finished
- executing `deploy:symlink’
- executing “rm -f /var/www/html/\_stratplace.com/test/current && ln -s  
/var/www/html/\_stratplace.com/test/releases/20080310005233  
/var/www/html/\_stratplace.com/test/current”  
servers: [“8.12.43.95”]  
[8.12.43.95] executing command  
command finished  
\*\* transaction: commit
- executing `deploy:restart’
- executing “sudo -p 'sudo password: ’ -u app  
/var/www/html/\_stratplace.com/test/current/script/process/reaper”  
servers: [“8.12.43.95”]  
[8.12.43.95] executing command  
\*\*\* [err :: 8.12.43.95] sh: sudo: not found  
command finished  
command “sudo -p 'sudo password: ’ -u app  
/var/www/html/\_stratplace.com/test/current/script/process/reaper” failed  
on 8.12.43.95  
[dev:~/cap/config] deploy$

cap script:  
set :application, “test”  
set :user, “deploy”  
set :repository,  
“svn+ssh://#{user}@bla.stratce.com/var/repos/stratplace”  
set :deploy\_to, “/var/www/html/\_stratplace.com/#{application}”  
set :password, “bla”  
set :scm\_command, “/opt/csw/bin/svn”  
set :local\_scm\_command, :default

# If you aren’t deploying to /u/apps/#{application} on the target

# servers (which is the default), you can specify the actual location

# via the :deploy\_to variable:

# If you aren’t using Subversion to manage your source code, specify

# your SCM below:

# set :scm, :subversion

role :app, “4.2.43.12”  
#role :app, “your app-server here”  
#role :web, “your web-server here”  
#role :db, “your db-server here”, :primary =\> true  
~
