当我将新gems添加到我的应用程序代码中并尝试部署它时,我的独角兽无法重新启动。日志文件显示由于未初始化的常量,工作进程无法启动。例如,上次我有这个:
I, [2012-11-20T13:01:03.969130 #26750] INFO -- : executing ["/srv/tutti/shared/bundle/ruby/1.9.1/bin/unicorn", "-D", "-c", "/srv/tutti/shared/config/unicorn.rb", "-E", "production", {10=>#<Kgio::UNIXServer:fd 10>}] (in /srv/tutti/releases/20121120125618)
I, [2012-11-20T13:01:03.969539 #26750] INFO -- : forked child re-executing...
I, [2012-11-20T13:01:05.056841 #26750] INFO -- : inherited addr=/tmp/unicorn.tutti.sock fd=10
I, [2012-11-20T13:01:05.057480 #26750] INFO -- : Refreshing Gem list
/srv/tutti/releases/20121120125618/config/initializers/simple_form.rb:2:in `<top (required)>': uninitialized constant SimpleForm (NameError)
<...>
E, [2012-11-20T13:01:09.947747 #21381] ERROR -- : reaped #<Process::Status: pid 26750 exit 1> exec()-ed
gem "simple_form"
中有/srv/tutti/releases/20121120125618/Gemfile
,如果我停止&amp;开始而不是发送USR2,它正常工作。
文件:
顺便说一句,删除preload_app true
并发送HUP信号也有一些问题。