Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save harshalbhakta/a80c76c14055ffe4c98a to your computer and use it in GitHub Desktop.

Select an option

Save harshalbhakta/a80c76c14055ffe4c98a to your computer and use it in GitHub Desktop.
Unicorn doesn't pick changes after deployment. Hard restart. (Rails, Nginx, Unicorn & Capistrano)
#-- local machine
$ cap production unicorn:stop
$ cap production nginx:stop
$ ssh deployer@example.com
#-- server
$ rm ~/apps/:app_name/current/tmp/pids/unicorn.*
$ rm /tmp/unicorn.:app_name.sock
# Helpful when code chagnes don't reflect after cap deploy.
# Old unicorn processes keep serving previous version.
$ ps aux | grep 'unicorn' | awk '{print $2}' | xargs sudo kill -9
#-- local machine
$ cap production unicorn:start
$ cap production nginx:start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment