Im using Zsh on the client and server. When I use ssh to run a command on the remote server it can not find the binary:
ssh gt "cd /home/****/app/staging && bundle exec rake db:migrate RAILS_ENV=staging" zsh:1: command not found: bundle
I can run the same command fine if I SSH in with an interactive shell.
On the server the
$PATH is set in both .zshrc and .zshenv
bundle is not in my $PATH on the server. Maybe this has something to do with RVM (Ruby Version Manager) which hooks in to
cd, so when you
cd in to a directory with a
.rvmrc file it sets up the Ruby environment and adds
bundle to the $PATH. I need to find out if the
cd hook is also triggered for non-interactive shells.