解决方法

加上软链接

webuser@staging-cs-k8s-worker004:/usr/bin$ which bundle
/home/webuser/.rbenv/shims/bundle
webuser@staging-cs-k8s-worker004:/usr/bin$
webuser@staging-cs-k8s-worker004:/usr/bin$
webuser@staging-cs-k8s-worker004:/usr/bin$ ln -s /home/webuser/.rbenv/shims/bundle /usr/bin/bundle
ln: failed to create symbolic link '/usr/bin/bundle': Permission denied
webuser@staging-cs-k8s-worker004:/usr/bin$ sudo ln -s /home/webuser/.rbenv/shims/bundle /usr/bin/bundle

参考链接

问题解决:安装完ruby却提示[/usr/bin/ruby: No such file or directory]

报错信息

报错信息

00:06 bundler:install
      01 bundle install --path /srv/www/udesk_nvwa/shared/bundle --jobs 4 --without development test --deployment --quiet
      01 /usr/bin/env: ‘bundle’
      01 : No such file or directory
#<Thread:0x00007f8740865fc8@/Users/chanweiyan/.rvm/gems/ruby-2.6.5/gems/sshkit-1.20.0/lib/sshkit/runners/parallel.rb:10 run> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
	13: from /Users/chanweiyan/.rvm/gems/ruby-2.6.5/gems/sshkit-1.20.0/lib/sshkit/runners/parallel.rb:12:in `block (2 levels) in execute'
	12: from /Users/chanweiyan/.rvm/gems/ruby-2.6.5/gems/sshkit-1.20.0/lib/sshkit/backends/abstract.rb:31:in `run'
	11: from /Users/chanweiyan/.rvm/gems/ruby-2.6.5/gems/sshkit-1.20.0/lib/sshkit/backends/abstract.rb:31:in `instance_exec'
	10: from /Users/chanweiyan/.rvm/gems/ruby-2.6.5/gems/capistrano-bundler-1.6.0/lib/capistrano/tasks/bundler.cap:26:in `block (3 levels) in <top (required)>'
	 9: from /Users/chanweiyan/.rvm/gems/ruby-2.6.5/gems/sshkit-1.20.0/lib/sshkit/backends/abstract.rb:92:in `within'
	 8: from /Users/chanweiyan/.rvm/gems/ruby-2.6.5/gems/capistrano-bundler-1.6.0/lib/capistrano/tasks/bundler.cap:27:in `block (4 levels) in <top (required)>'
	 7: from /Users/chanweiyan/.rvm/gems/ruby-2.6.5/gems/sshkit-1.20.0/lib/sshkit/backends/abstract.rb:100:in `with'
	 6: from /Users/chanweiyan/.rvm/gems/ruby-2.6.5/gems/capistrano-bundler-1.6.0/lib/capistrano/tasks/bundler.cap:39:in `block (5 levels) in <top (required)>'
	 5: from /Users/chanweiyan/.rvm/gems/ruby-2.6.5/gems/sshkit-1.20.0/lib/sshkit/backends/abstract.rb:80:in `execute'
	 4: from /Users/chanweiyan/.rvm/gems/ruby-2.6.5/gems/sshkit-1.20.0/lib/sshkit/backends/abstract.rb:148:in `create_command_and_execute'
	 3: from /Users/chanweiyan/.rvm/gems/ruby-2.6.5/gems/sshkit-1.20.0/lib/sshkit/backends/abstract.rb:148:in `tap'
	 2: from /Users/chanweiyan/.rvm/gems/ruby-2.6.5/gems/sshkit-1.20.0/lib/sshkit/backends/abstract.rb:148:in `block in create_command_and_execute'
	 1: from /Users/chanweiyan/.rvm/gems/ruby-2.6.5/gems/sshkit-1.20.0/lib/sshkit/backends/netssh.rb:170:in `execute_command'
/Users/chanweiyan/.rvm/gems/ruby-2.6.5/gems/sshkit-1.20.0/lib/sshkit/command.rb:97:in `exit_status=': bundle exit status: 127 (SSHKit::Command::Failed)
bundle stdout: Nothing written
bundle stderr: /usr/bin/env: ‘bundle’: No such file or directory
	1: from /Users/chanweiyan/.rvm/gems/ruby-2.6.5/gems/sshkit-1.20.0/lib/sshkit/runners/parallel.rb:11:in `block (2 levels) in execute'
/Users/chanweiyan/.rvm/gems/ruby-2.6.5/gems/sshkit-1.20.0/lib/sshkit/runners/parallel.rb:15:in `rescue in block (2 levels) in execute': Exception while executing on host 101.201.197.101: bundle exit status: 127 (SSHKit::Runner::ExecuteError)
bundle stdout: Nothing written
bundle stderr: /usr/bin/env: ‘bundle’: No such file or directory
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing on host 101.201.197.101: bundle exit status: 127
bundle stdout: Nothing written
bundle stderr: /usr/bin/env: ‘bundle’: No such file or directory
/Users/chanweiyan/.rvm/gems/ruby-2.6.5/gems/sshkit-1.20.0/lib/sshkit/runners/parallel.rb:15:in `rescue in block (2 levels) in execute'
/Users/chanweiyan/.rvm/gems/ruby-2.6.5/gems/sshkit-1.20.0/lib/sshkit/runners/parallel.rb:11:in `block (2 levels) in execute'

Caused by:
SSHKit::Command::Failed: bundle exit status: 127
bundle stdout: Nothing written
bundle stderr: /usr/bin/env: ‘bundle’: No such file or directory
/Users/chanweiyan/.rvm/gems/ruby-2.6.5/gems/sshkit-1.20.0/lib/sshkit/command.rb:97:in `exit_status='
/Users/chanweiyan/.rvm/gems/ruby-2.6.5/gems/sshkit-1.20.0/lib/sshkit/backends/netssh.rb:170:in `execute_command'
/Users/chanweiyan/.rvm/gems/ruby-2.6.5/gems/sshkit-1.20.0/lib/sshkit/backends/abstract.rb:148:in `block in create_command_and_execute'
/Users/chanweiyan/.rvm/gems/ruby-2.6.5/gems/sshkit-1.20.0/lib/sshkit/backends/abstract.rb:148:in `tap'
/Users/chanweiyan/.rvm/gems/ruby-2.6.5/gems/sshkit-1.20.0/lib/sshkit/backends/abstract.rb:148:in `create_command_and_execute'
/Users/chanweiyan/.rvm/gems/ruby-2.6.5/gems/sshkit-1.20.0/lib/sshkit/backends/abstract.rb:80:in `execute'
/Users/chanweiyan/.rvm/gems/ruby-2.6.5/gems/capistrano-bundler-1.6.0/lib/capistrano/tasks/bundler.cap:39:in `block (5 levels) in <top (required)>'
/Users/chanweiyan/.rvm/gems/ruby-2.6.5/gems/sshkit-1.20.0/lib/sshkit/backends/abstract.rb:100:in `with'
/Users/chanweiyan/.rvm/gems/ruby-2.6.5/gems/capistrano-bundler-1.6.0/lib/capistrano/tasks/bundler.cap:27:in `block (4 levels) in <top (required)>'
/Users/chanweiyan/.rvm/gems/ruby-2.6.5/gems/sshkit-1.20.0/lib/sshkit/backends/abstract.rb:92:in `within'
/Users/chanweiyan/.rvm/gems/ruby-2.6.5/gems/capistrano-bundler-1.6.0/lib/capistrano/tasks/bundler.cap:26:in `block (3 levels) in <top (required)>'
/Users/chanweiyan/.rvm/gems/ruby-2.6.5/gems/sshkit-1.20.0/lib/sshkit/backends/abstract.rb:31:in `instance_exec'
/Users/chanweiyan/.rvm/gems/ruby-2.6.5/gems/sshkit-1.20.0/lib/sshkit/backends/abstract.rb:31:in `run'
/Users/chanweiyan/.rvm/gems/ruby-2.6.5/gems/sshkit-1.20.0/lib/sshkit/runners/parallel.rb:12:in `block (2 levels) in execute'
Tasks: TOP => deploy:updated => bundler:install
The deploy has failed with an error: Exception while executing on host 101.201.197.101: bundle exit status: 127
bundle stdout: Nothing written
bundle stderr: /usr/bin/env: ‘bundle’: No such file or directory
** Invoke deploy:failed (first_time)
** Execute deploy:failed


** DEPLOY FAILED
** Refer to log/capistrano.log for details. Here are the last 20 lines:


 DEBUG [95dd86f8] 	5069cf829202641130b818ab6f317188e6e72834

 DEBUG [95dd86f8] Finished in 0.098 seconds with exit status 0 (successful).

 DEBUG [d6b4173e] Running if test ! -d /srv/www/udesk_nvwa/releases/20200221075938; then echo "Directory does not exist '/srv/www/udesk_nvwa/releases/20200221075938'" 1>&2; false; fi on 101.201.197.101

 DEBUG [d6b4173e] Command: if test ! -d /srv/www/udesk_nvwa/releases/20200221075938; then echo "Directory does not exist '/srv/www/udesk_nvwa/releases/20200221075938'" 1>&2; false; fi

 DEBUG [d6b4173e] Finished in 0.334 seconds with exit status 0 (successful).

  INFO [0b35d4f1] Running /usr/bin/env echo "5069cf829202641130b818ab6f317188e6e72834" > REVISION on 101.201.197.101

 DEBUG [0b35d4f1] Command: cd /srv/www/udesk_nvwa/releases/20200221075938 && /usr/bin/env echo "5069cf829202641130b818ab6f317188e6e72834" > REVISION

  INFO [0b35d4f1] Finished in 0.085 seconds with exit status 0 (successful).

 DEBUG [3ae35bff] Running if test ! -d /srv/www/udesk_nvwa/releases/20200221075938; then echo "Directory does not exist '/srv/www/udesk_nvwa/releases/20200221075938'" 1>&2; false; fi on 101.201.197.101

 DEBUG [3ae35bff] Command: if test ! -d /srv/www/udesk_nvwa/releases/20200221075938; then echo "Directory does not exist '/srv/www/udesk_nvwa/releases/20200221075938'" 1>&2; false; fi

 DEBUG [3ae35bff] Finished in 0.482 seconds with exit status 0 (successful).

 DEBUG [26e33c14] Running /usr/bin/env bundle check --path /srv/www/udesk_nvwa/shared/bundle on 101.201.197.101

 DEBUG [26e33c14] Command: cd /srv/www/udesk_nvwa/releases/20200221075938 && /usr/bin/env bundle check --path /srv/www/udesk_nvwa/shared/bundle

 DEBUG [26e33c14] 	/usr/bin/env: ‘bundle’

 DEBUG [26e33c14] 	: No such file or directory

 DEBUG [26e33c14] Finished in 0.087 seconds with exit status 127 (failed).

  INFO [4463c1ca] Running /usr/bin/env bundle install --path /srv/www/udesk_nvwa/shared/bundle --jobs 4 --without development test --deployment --quiet on 101.201.197.101

 DEBUG [4463c1ca] Command: cd /srv/www/udesk_nvwa/releases/20200221075938 && /usr/bin/env bundle install --path /srv/www/udesk_nvwa/shared/bundle --jobs 4 --without development test --deployment --quiet

 DEBUG [4463c1ca] 	/usr/bin/env: ‘bundle’

 DEBUG [4463c1ca] 	: No such file or directory
Logo

K8S/Kubernetes社区为您提供最前沿的新闻资讯和知识内容

更多推荐