title: Bundle stderr: ArgumentError: "...tmp/pids/unicorn.pid" not writable. How to solve it?
body: <p>I am deploying code with Capistrano and while the process, I get the error that</p>
  
  <pre><code>SSHKit::Runner::ExecuteError: Exception while executing as deployer@IP: Exception while executing as deployer@IP: bundle exit status: 1
  bundle stdout: bundler: failed to load command: unicorn (/home/deployer/apps/project/shared/bundle/ruby/2.4.0/bin/unicorn)
  bundle stderr: ArgumentError: directory for pid=/home/deployer/apps/project/current/tmp/pids/unicorn.pid not writable
  </code></pre>
  
  <p>How do I solve this issue? Do I need to set something in the <code>deploy.rb</code> file?</p>
  
  <p>I've tried to manually create the <code>pids</code> directory, set permissions on 777 (<code>mkdir -m 777 pids</code>), but nothing helped.</p>
  
  <p>How can I make that directory writable?</p>