I also followed the same guide and had the same problem.
Running the script in init.d / unicorn_appname evaluates to:
su - deploy -c cd /home/deploy/appname && bundle exec unicorn -c config/unicorn.rb -E production -D
root rails ( "" ), . rbenv - , "deploy" . , , .bashrc , . .bashrc, su - .
, rbenv .profile. , root su - 'deploy' .