I'm trying to run rspec tests on remote machines. Before running, I need to pull from git all projects on remote machine and only then run tests. To do that I'm running terminal command, like
ssh teststand1@192.168.0.102 "source ~/.rvm/scripts/rvm; cd (PathToProjectFolder) && git pull && git checkout develop && git pull && rspec (PathToSpec)" > LOG.txt
Some messages and errors, like
Already on 'develop'
or
fatal: Unable to create 'path_to_somefile': File exists.
or any Ruby exceptions doesn't output to LOG.txt. I could see them in terminal, but not in LOG.txt. How can I catch them?