独角兽通过命令成功地开始:
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>'config/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
Ruby2.1.0p0 (2013-12-25修订版44422) x86_64-linux
独角兽v4.8.2
我的谷歌搜索没有产生任何结果。
发布于 2014-04-22 05:18:00
你忘了一个-c。
试试这个:
bundle exec unicorn -c ./config/unicorn.rb -E development
发布于 2014-04-22 05:01:54
首先,您使用bundle exec unicorn_rails -E development,一切都很好。
那么你使用的是bundle exec unicorn ./config/unicorn.rb -E development而什么都不起作用?
这个问题真的很有趣,您已经使用了unicorn而不是unicorn_rails。
https://stackoverflow.com/questions/23208121
复制相似问题