title: Deployment of Puma with Nginx and Capistrano
body: <p>I am running into some issues when I'm trying to deploy my Rails app with Puma and Nginx.<br>
  I have a regular Capistrano setup, that has the <code>puma/capistrano</code> included.</p>
  
  <p>When running <code>cap deploy:cold</code> it works perfectly fine the first time.<br>
  After this initial deploy, I'm trying to deploy my changes via <code>cap deploy</code>, which results in  </p>
  
  <pre><code>Bad response from server: 500  
  </code></pre>
  
  <p>After I try to use <code>cap deploy:stop</code> I'm getting following error:   </p>
  
  <pre><code>undefined method `split' for nil:NilClass  
  </code></pre>
  
  <p>When running <code>cap deploy:restart</code> it results in:  </p>
  
  <pre><code>no such file or directory - "/home/deployer/apps/teachmeo/shared/sockets/pumactl.sock"
  </code></pre>
  
  <p>So, the only way for me after all this to redeploy is cleaning up the <code>/shared/sockets/</code> dir and  using <code>cap deploy:cold</code> again</p>
  
  <p>What could be going wrong here? </p>