1
내가 할 수 다음SSH + 레일 : 실행 레일 (카피 스트라 노)는
ssh [email protected] "cap production rails:console"
같이 할 수있는 방법이 있는지 host
내 레일 개발 환경입니다 알고 싶어 한 줄에 SSH 세션으로 명령 원격 콘솔을 사용합니다. 내가 그 명령을 시도 할 때
, 그것은 보여줍니다
bash: cap: command not found
은 그 때 나는
ssh [email protected] "bundle exec cap production rails:console"
를 실행하려고하지만 내가 rvm
를 사용 bash: bundle: command not found
참고를 보여줍니다.
내 .bashrc
(발췌) :
ssh [email protected] "/Users/anton/.rvm/gems/[email protected]/bin/cap production rails:console"
:
....
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
...
#linuxbrew
export PATH="$HOME/.linuxbrew/bin:$PATH"
export MANPATH="$HOME/.linuxbrew/share/man:$MANPATH"
export INFOPATH="$HOME/.linuxbrew/share/info:$INFOPATH"
# Add RVM to PATH for scripting. Make sure this is the last PATH variable
change. export PATH="$PATH:$HOME/.rvm/bin"
# for transcriber service
export SOUNDNOTATION_TRANSCRIBER_BINARY_PATH="$HOME/transcriber/SoundnotationTranscriber"
# sidekiq
export TRANSCRIPTION_API_HOST_PORT='localhost:4040'
# wkhtmltopdf
export WKHTMLTOPDF="/home/soundnotation/.rvm/gems/ruby-2.3.1/bin/wkhtmltopdf"
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_rsa
로그인 할 때 기본 경로는 앱 경로이므로 예. 심지어 수동으로 응용 프로그램 경로를 추가, 결과는 동일합니다 – Simon
모자에 대한 절대 경로를 사용하려고합니다. 내 대답이 업데이트되었습니다. – AntonTkachov
오류는 다음과 같습니다 :'/ usr/bin/env : 'ruby_executable_hooks': 파일이나 디렉토리가 없습니다. ' – Simon