/etc/init.d/unicorn does not know where to find Ruby because it is managed through RVM. Usually your .bashrc or similar file executes and sets up the environment; this does not happen in initialization scripts (or probably anything else executed by root).
The solution is to use wrappers. For example, to create a binary called system_ruby that loads RVM 1.9.2p180 and then ruby , do the following:
rvm wrapper ruby-1.9.2-p180 system ruby
For more information and more details, check out my answer that addresses a similar issue.
Michelle tilley
source share