It offers the easiest configuration if you’re used to rvm as your Ruby package manager. I think it handles rbenv well judging by some comments, not so sure about chruby.

Anyway, there are several gems out there for this but they all seem to only offer configuration for a virtual server that is added to the /etc/nginx/sites-available (and then symlinked from /etc/nginx/sites-enabled).

What if you would like to customize Nginx global directives that exist outside of a http or server block and therefore not inherited by your custom server directives?

Two such useful directives for tuning the performance of Nginx are `worker_processes` and `worker_connections`.

Here’s an example task to add to your config/deploy.rb file that you can customize as you need. In my case, my Ubuntu server installed a default /etc/nginx/nginx.conf file that had set `worker_processes` to 4 (too high as only one core) and `worker_connections` to 768 (too low for the box).