Capistrano 3 deploy:检查错误的RVM权限被拒绝

时间:2019-06-17 20:43:52

标签: ruby-on-rails-5 rvm capistrano3

我正在运行Rails 5.2和Capistrano 3,并针对我的生产服务器。当我运行cap production deploy:check时,我得到了关注

终端窗口:

Caused by:
SSHKit::Command::Failed: rvm exit status: 126
rvm stdout: Nothing written
rvm stderr: bash: /home/username/.rvm/bin/rvm: Permission denied

Capistrano日志:

INFO ---------------------------------------------------------------------------
  INFO START 2019-06-17 16:26:41 -0400 cap production deploy:check
  INFO ---------------------------------------------------------------------------
 DEBUG [63b43ce1] Running /usr/bin/env which passenger as username@server
 DEBUG [63b43ce1] Command: /usr/bin/env which passenger
 DEBUG [99d1da7c]   /usr/local/bin/passenger
 DEBUG [99d1da7c] Finished in 0.269 seconds with exit status 0 (successful).
 DEBUG [cf898686] Running [ -d ~/.rvm ] as username@server
 DEBUG [cf898686] Command: [ -d ~/.rvm ]
 DEBUG [b57dc7b6] Finished in 0.044 seconds with exit status 0 (successful).
 DEBUG [ddb0cae2] Running ~/.rvm/bin/rvm version as username@server
 DEBUG [ddb0cae2] Command: ~/.rvm/bin/rvm version
 DEBUG [439fedbe]   bash: /home/username/.rvm/bin/rvm: Permission denied

我的RVM安装未创建.rvm文件夹或其中的任何内容,我手动进行了此操作以解决我的问题。我的主要问题是当前不知道本节的内容。

1 个答案:

答案 0 :(得分:0)

我已经通过运行成功解决了问题

sudo chown -R ***USER_neme***:rvm /usr/share/rvm/*

当前用户在哪里。