# Cap deploy problem

**URL:** <https://www.ruby-forum.com/t/cap-deploy-problem/93247>\
**Category:** Deployment\
**Created:** [April 30, 2007, 1:21am UTC](https://www.ruby-forum.com/t/cap-deploy-problem/93247 "2007-04-30T01:21:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![matthi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9f8e36/32.png) [@matthi](https://www.ruby-forum.com/u/matthi)\
**Post date:** [April 30, 2007, 1:21am UTC](https://www.ruby-forum.com/t/cap-deploy-problem/93247/1 "2007-04-30T01:21:11Z")

</div>

Hi,

this is the first time i try to set up a testserver mainly following  
this great tutorial “Debian On Rails : Apache 2.2 + MySQL + Ruby +  
Rails + PHP + Mongrel + Mongrel\_cluster + Subversion + Trac +  
Capistrano” at  
[http://www.stoneageblog.com/articles/2007/01/11/debian-on-rails-apache-2-2-mysql-ruby-rails-php-mongrel-mongrel\_cluster-subversion-trac-capistrano/](http://www.stoneageblog.com/articles/2007/01/11/debian-on-rails-apache-2-2-mysql-ruby-rails-php-mongrel-mongrel_cluster-subversion-trac-capistrano/)

So far I ve got everything working up to the “cap setup” commmand and am  
now having big, big trouble with “cap deploy” and am allways ending up  
with:

- executing task restart
- executing “sudo /var/rails/xyz/current/script/process/reaper”  
servers: [“[xyz.com](http://xyz.com)”]  
[[xyz.com](http://xyz.com)] executing command  
\*\* [out :: [xyz.com](http://xyz.com)] sudo:  
\*\* [out :: [xyz.com](http://xyz.com)] /var/rails/xyz/current/script/process/reaper:  
command not found  
command finished  
command “sudo /var/rails/xyz/current/script/process/reaper” failed on  
[xyz.com](http://xyz.com)

Ok, so far I can tell:  
ls -la on that file results in:  
-rw-rw-r-- 1 matthi matthi 108 2007-04-30 02:57  
/var/rails/xyz/current/script/process/reaper

Trying…  
/var/rails/servipuja/current/script/process/reaper results in -bash:  
/var/rails/servipuja/current/script/process/reaper: Permission denied

chmod 755 /var/rails/servipuja/current/script/process/reaper and trying  
to run this manually results in:

Couldn’t find any pid file in ‘/var/rails/xyz/current/tmp/pids’ matching  
‘dispatch.[0-9]\*.pid’  
(also looked for processes matching  
“/var/rails/xyz/current/public/dispatch.fcgi”)

SO, by no means I am an unixprof nor anything, but first question is,  
why isnt the reaper executable when cap is “creating” it and should it  
be at all or do I have another problem ??

I tried to explain this as detailed as I can and hope someone came  
across this stuff and can help me out

best regards

matthi

---

<div class="post-metadata">

**Author:** ![matthi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9f8e36/32.png) [@matthi](https://www.ruby-forum.com/u/matthi)\
**Post date:** [May 2, 2007, 6:27am UTC](https://www.ruby-forum.com/t/cap-deploy-problem/93247/2 "2007-05-02T06:27:38Z")

</div>

Does not look like you are using the fastcgi processes that reaper is  
designed to restart in the setup you described. In your cap script set  
them to false. EG set :spinner, “false”. See the manual for details.  
Good luck. [Peak Obsession](http://manuals.rubyonrails.com/read/chapter/100#page270)

---

<div class="post-metadata">

**Author:** ![matthi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9f8e36/32.png) [@matthi](https://www.ruby-forum.com/u/matthi)\
**Post date:** [May 2, 2007, 11:33am UTC](https://www.ruby-forum.com/t/cap-deploy-problem/93247/3 "2007-05-02T11:33:18Z")

</div>

Hi Matthi,

On 4/30/07, matthi [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

this great tutorial "Debian On Rails : Apache 2.2 + MySQL + Ruby +

> Rails + PHP + Mongrel + Mongrel\_cluster + Subversion + Trac +

As Cuthbert already mentioned: you are using Mongrel and not FastCGI, so  
you  
don’t need any of those scripts to run periodically.

\*\* [out :: [xyz.com](http://xyz.com)] sudo:

> \*\* [out :: [xyz.com](http://xyz.com)] /var/rails/xyz/current/script/process/reaper:  
> command not found  
> command finished  
> command “sudo /var/rails/xyz/current/script/process/reaper” failed on  
> [xyz.com](http://xyz.com)

You can’t run anything on unix / linux, what doesn’t have execute (x)  
rights, not even with sudo. If your local development environment is a  
unix  
or linux, you should chmod +x those scripts and make a commit back to  
your  
subversion repository. That will preserve your file permissions on your  
deploys.

If you using windows boxes to develop or anything, you should check out  
the  
executable subversion property. It will automatically mark the specified  
files as executables on linux / unix hosts.

See:

[http://svnbook.red-bean.com/nightly/en/svn.ref.properties.html](http://svnbook.red-bean.com/nightly/en/svn.ref.properties.html)  
[http://svnbook.red-bean.com/nightly/en/svn.advanced.props.file-portability.html#svn.advanced.props.special.executable](http://svnbook.red-bean.com/nightly/en/svn.advanced.props.file-portability.html#svn.advanced.props.special.executable)

Regards,  
AndrÃ¡s

–  
AndrÃ¡s Tarsoly  
removed\_email\_address@domain.invalid
