I\'m using Rails 4.0.0, Ruby 2.3 and Unicorn.
My app was working perfectly until the day I tried to add a nem gem in my Gemfile. Everything\'s working like a charm l
Similar problem here. It happens when you change you Gemfile, using unicorn:reload
doesn't run your new code.
Solved restarting unicorn instead of reloading it.
If you are using Capistrano, change the after deploy trigger from
invoke 'unicorn:reload'
to:
invoke 'unicorn:stop'
invoke 'unicorn:start'
According to https://github.com/tablexi/capistrano3-unicorn/issues/45 unicorn:restart
is not working properly.
Our problem was that unicorn master process wasn't restarted correctly, because it was killed with:
/bin/kill -s HUP `cat tmp/pids/unicorn.pid`
Which doesn't actually kill the unicorn master process (only reloads the config, see SIGHUP documentation). Verify by running ps -ef | grep 'unicorn'
.
Our problem was solved changing the killing of unicorn master process with:
/bin/kill `cat tmp/pids/unicorn.pid`
PS: cat tmp/pids/unicorn.pid
just outputs the PID of the unicorn master process.