Question: When deploying my Rails app via Capistrano, the very last thing it tries to execute is this:

```
sudo -p 'sudo password: ' -u app /home/user/public_html/example.com/current/script/process/reaper

```

Then it throws this error:

```
failed: "sh -c \"sudo -p 'sudo password: ' -u app /home/user/public_html/example.com/current/script/process/reaper\"" on 123.456.789.012

```

The app still deploys and starts fine...but what does process/reaper do and what can I do to get rid of the error?

Answer: 
Before the Mongrel/Passenger epoch and before being build upon Rack, the only way to run a Rails application was using CGI or FGCI.
The script/reaper file was used to start/stop a Rails process.

By default, Capistrano tries to start a new Rails process running the reaper script.
You should customize the default behaviour.

Assuming you are running your Rails app using Passenger (mod\_rails), install the following [Capistrano + Passenger (mod\_rails)](http://www.simonecarletti.com/blog/2008/12/capistrano-deploy-recipe-with-passenger-mod_rails-taste/) recipe and Capistrano will gracefully restart your Passenger instance on deploy.
Using rails 2.3 I added this to my `config/deploy.rb`

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

```

That stopped the reaper error and properly restarted passenger.