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 w开发者_JS百科hat does process/reaper do and what can I do to get rid of the error?
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) 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.
精彩评论