簡體   English   中英

Unicorn啟動配置失敗

[英]Unicorn fail start with config

Unicorn通過命令成功啟動:

bundle exec unicorn_rails -E development

而不能使用config.rb

bundle exec unicorn ./config/unicorn.rb -E development

E, [2014-04-22T11:04:49.358626 #8207] ERROR -- : reaped #<Process::Status: pid 8465 exit 1> worker=0
I, [2014-04-22T11:04:49.359031 #8207]  INFO -- : worker=0 spawning...
I, [2014-04-22T11:04:49.361032 #8468]  INFO -- : worker=0 spawned pid=8468
I, [2014-04-22T11:04:49.361354 #8468]  INFO -- : Refreshing Gem list
E, [2014-04-22T11:04:49.361911 #8468] ERROR -- : undefined method `worker_processes' for main:Object (NoMethodError)
/home/den/buybets/config/unicorn.rb:1:in `<top (required)>'
/home/den/.rvm/gems/ruby-2.1.0/gems/unicorn-4.8.2/lib/unicorn.rb:50:in `require'
/home/den/.rvm/gems/ruby-2.1.0/gems/unicorn-4.8.2/lib/unicorn.rb:50:in `block in builder'
/home/den/.rvm/gems/ruby-2.1.0/gems/unicorn-4.8.2/lib/unicorn/http_server.rb:760:in `call'
/home/den/.rvm/gems/ruby-2.1.0/gems/unicorn-4.8.2/lib/unicorn/http_server.rb:760:in `build_app!'
/home/den/.rvm/gems/ruby-2.1.0/gems/unicorn-4.8.2/lib/unicorn/http_server.rb:624:in `init_worker_process'
/home/den/.rvm/gems/ruby-2.1.0/gems/unicorn-4.8.2/lib/unicorn/http_server.rb:647:in `worker_loop'
/home/den/.rvm/gems/ruby-2.1.0/gems/unicorn-4.8.2/lib/unicorn/http_server.rb:521:in `spawn_missing_workers'
/home/den/.rvm/gems/ruby-2.1.0/gems/unicorn-4.8.2/lib/unicorn/http_server.rb:532:in `maintain_worker_count'
/home/den/.rvm/gems/ruby-2.1.0/gems/unicorn-4.8.2/lib/unicorn/http_server.rb:290:in `join'
/home/den/.rvm/gems/ruby-2.1.0/gems/unicorn-4.8.2/bin/unicorn:126:in `<top (required)>'
/home/den/.rvm/gems/ruby-2.1.0/bin/unicorn:23:in `load'
/home/den/.rvm/gems/ruby-2.1.0/bin/unicorn:23:in `<main>'
/home/den/.rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:in `eval'
/home/den/.rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:in `<main>'

配置/ unicorn.rb

worker_processes 2

working_directory("/home/deployer/blog/current")

stderr_path "/home/deployer/blog/log/unicorn.stderr.log"
stdout_path "/home/deployer/blog/log/unicorn.stdout.log"

Rails 4.1.0

ruby 2.1.0p0(2013-12-25修訂版44422)[x86_64-linux]

獨角獸v4.8.2

我的Google搜索沒有產生任何結果。

你忘記了-c

嘗試這個:

bundle exec unicorn -c ./config/unicorn.rb -E development

首先你使用bundle exec unicorn_rails -E development ,一切正常。
然后你使用bundle exec unicorn ./config/unicorn.rb -E development並沒有任何作用?

問題非常有趣,你使用的是unicorn而不是unicorn_rails

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM