Reputation: 222
Unicorn succesfully start by command:
bundle exec unicorn_rails -E development
And not work with 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
ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-linux]
unicorn v4.8.2
my Google search did not produce any results.
Upvotes: 3
Views: 2081
Reputation: 908
You're forgetting a -c
.
Try this:
bundle exec unicorn -c ./config/unicorn.rb -E development
Upvotes: 3
Reputation: 619
Firstly you use bundle exec unicorn_rails -E development
and everything works fine.
Then you use bundle exec unicorn ./config/unicorn.rb -E development
and nothing works?
The problem is really funny, you have used unicorn
instead of unicorn_rails
.
Upvotes: 0