-su: bundle: command not found when running unicorn

I follow the tutorial on DigitalOcean (fyi, these are the tutorials, link1 , link2 ) to install the finished application for rails using unicorn and nginx, and when I get to the unicorn installation part. When I try to enter it into the console:

sudo service unicorn_appname start

I get this error:

Starting appname
-su: bundle: command not found

All users can contact. This message does not make any sense to me. Any ideas?

+4
source share
3 answers

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' .

+4

, " Ruby/usr/bin/ruby", gem "bundler", Ruby, ( RVM RBENV - ). , Ruby- "bundle exec unicorn...".

+1

, rbenv .profile

cd ~
vi .profile

, PATH = " : $ HOME/.rbenv/:

(ESC: wq)

, .

+1

Source: https://habr.com/ru/post/1584154/


All Articles