2012-03-07 28 views
6

我正在嘗試使用folling命令重新啓動thin。爲我的Ruby on Rails應用程序重新啓動Thin時出錯

thin restart -c config/thin.yml 

這裏是thin.yml內容:

rackup: /root/SEHabitat/config.ru 
pid: /tmp/pids/thin.pid 
wait: 30 
timeout: 600 
log: /root/SEHabitat/log/thin.log 
max_conns: 1024 
require: [] 

max_persistent_conns: 512 
environment: production 
servers: 3 
daemonize: true 
#chdir: /root/SEHabitat 
socket: /tmp/thin.sock 
#port: 3000 

下面是輸出:

/usr/lib/ruby/gems/1.8/gems/thin-1.2.11/lib/thin/runner.rb:171:in `chdir': Not a directory - /root/SEHabitat/config/thin.yml (Errno::ENOTDIR) 
from /usr/lib/ruby/gems/1.8/gems/thin-1.2.11/lib/thin/runner.rb:171:in `run_command' 
from /usr/lib/ruby/gems/1.8/gems/thin-1.2.11/lib/thin/runner.rb:151:in `run!' 
from /usr/lib/ruby/gems/1.8/gems/thin-1.2.11/bin/thin:6 
from /usr/bin/thin:19:in `load' 
from /usr/bin/thin:19 
+0

顯示config/thin.yml的內容 – Gacha 2012-03-07 13:53:35

+0

我已編輯顯示thin.yml的內容,謝謝! – 2012-03-07 13:56:42

回答

8

選項 「-c」 就是要改變目錄,你必須使用大寫在前「 - C「指定配置文件。喜歡thin config -C /etc/thin/myapp.yml -c /var/

+1

哇,我應該嘗試-C發佈之前。謝謝 – 2012-03-07 14:01:09

+0

@IanMason請接受答案。 – shingara 2012-03-07 14:25:11

相關問題