如果我以部署用户身份 ssh 进入我的 VPS 并运行,bundle -v
我会得到Bundler version 1.1.5
预期的结果。
如果我跑ssh deployment@123.123.123.123 bundle -v
,我会看到bash: bundle: command not found
为什么不显示 bundle 通过 ssh 运行命令?
更多信息
$ cat ~/.bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
if [ -d "${RBENV_ROOT}" ]; then
export PATH="${RBENV_ROOT}/bin:${PATH}"
eval "$(rbenv init -)"
fi
# If not running interactively, don't do anything
[ -z "$PS1" ] && return