我得到这个日志:
(Backtrace restricted to imported tasks)
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as
ubuntu@13.58.220.78: rvm exit status: 127
rvm stdout: bash: /home/ubuntu/.rvm/bin/rvm: No such file or directory
rvm stderr: Nothing written
Caused by:
SSHKit::Command::Failed: rvm exit status: 127
rvm stdout: bash: /home/ubuntu/.rvm/bin/rvm: No such file or directory
rvm stderr: Nothing written
Tasks: TOP => rvm:check
(See full trace by running task with --trace)
执行上限生产部署后。 关键是,RVM安装在那里,按照它正在寻找的确切路径。
请建议。
答案 0 :(得分:0)
可能你需要将rvm添加到PATH变量。否则,capistrano无法找到它,也无法从CLI运行它。
PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
export PATH
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
在主目录的.bashrc文件中添加以下行。确保重新启动会话或source .bashrc
。
答案 1 :(得分:0)
我最终必须这样做才能解决此问题(花几个小时):
ln -s /usr/share/rvm/bin/rvm .rvm/bin/rvm