什么是进程/收割机以及为什么它不起作用?
当通过 Capistrano 部署我的 Rails 应用程序时,它尝试执行的最后一件事是:
sudo -p 'sudo password: ' -u app /home/user/public_html/example.com/current/script/process/reaper
然后它抛出此错误:
failed: "sh -c \"sudo -p 'sudo password: ' -u app /home/user/public_html/example.com/current/script/process/reaper\"" on 123.456.789.012
应用程序仍然部署并正常启动...但是 process/reaper 做了什么以及我可以做什么来摆脱的错误?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在 Mongrel/Passenger 时代之前以及在 Rack 上构建之前,运行 Rails 应用程序的唯一方法是使用 CGI 或 FGCI。
脚本/收割器文件用于启动/停止 Rails 进程。
默认情况下,Capistrano 会尝试启动一个新的 Rails 进程来运行 reaper 脚本。
您应该自定义默认行为。
假设您使用 Passenger (mod_rails) 运行 Rails 应用程序,请安装以下 Capistrano + Passenger (mod_rails) 配方,Capistrano 将在部署时正常重启您的 Passenger 实例。
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.
使用 Rails 2.3,我将其添加到我的 config/deploy.rb 中,
这阻止了收割者错误并正确重新启动了乘客。
Using rails 2.3 I added this to my
config/deploy.rb
That stopped the reaper error and properly restarted passenger.