I am using deploying a Ruby on Rails app to a Linode VPS using Capistrano. I am using Unicorn as the application server and Nginx as the proxy. My problem is that I am not able
Actually, the error message has already told you why:
directory for pid=/home/deploy/apps/shared/pids/unicorn.pid not writable
So, does the directory /home/deploy/apps/shared/pids
exist? If not, you should call mkdir
to create it.
Unicorn process is running in background(-d), type
ps aux | grep unicorn
and kill running unicorn process then start once again.
in capistrano 3; if we change roles to :all, then while deployment capistrano saying;
and after deployment all symlinks not working anymore. And if tmp/pids folder in symlink array, then unicorn can't find the tmp/pids folder and saying unicorn.pid is not writable.WARN [SKIPPING] No Matching Host for .....
So we must use; roles: %w{web app db}
instead of roles :all
.
Sample server line at production.rb;
server 'YOUR_SERVER_IP', user: 'YOUR_DEPLOY_USER', roles: %w{web app db}, ssh_options: { forward_agent: true }