Restart Unicorn with Capistrano

The following tasks is what I use for starting  , stopping, restarting and my unicorn server:


desc "Start unicorn"
task :start, :except => { :no_release => true } do
  run "cd #{current_path} ; bundle exec unicorn_rails -c config/unicorn.rb -D -E production"

desc "Stop unicorn"
task :stop, :except => { :no_release => true } do
  run "kill -s QUIT `cat #{shared_path}/pids/`"

desc "Zero-downtime restart of Unicorn"

task :restart, :except => { :no_release => true } do

run "kill -s USR2 `cat #{shared_path}/pids/`"


Installing workstation for managing Chef server

A workstation is a computer that is configured to run knife, to synchronize with the chef-repo, and interact with a single Chef server. The workstation is the location from which most users will do most of their work.

We need ti install on our workstation:

  • knife
  • chef-sdk
  • chef-repo
  • ruby


[Read more…]

Install Ruby 2.3.1 or any other version on Centos

1. Installing Recommended Packages

There are few developemnt libraries required to run Ruby on Linux. Use following command to install recommended packages on your server using yum.


# yum install gcc-c++ patch readline readline-devel zlib zlib-devel 
# yum install libyaml-devel libffi-devel openssl-devel make 
# yum install bzip2 autoconf automake libtool bison iconv-devel

[Read more…]