1

当我将新的 gem 添加到我的应用程序代码中并尝试部署它时,我的独角兽无法重新启动。日志文件显示由于未初始化的常量,工作进程无法启动。例如上次我有这个:

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如果我停止并开始而不是发送 USR2,它可以正常工作。

文件:

顺便说一句,删除preload_app true和发送 HUP 信号也有一些问题。

4

0 回答 0