I have a Rails app that when deployed, runs the command
cd /home/app/staging/releases/20250304094541 && /usr/bin/env bundle install --jobs 4 --quiet
on the server. Due to --jobs 4 and the amount of memory available, it happens to be OOM-killed.
SSHKit happily assumes it has succeeded and continues, erroring on a follow-up step.
My suspicion is that this commented-out code points into the direction of a solution: https://github.com/capistrano/sshkit/blob/master/lib/sshkit/backends/netssh.rb#L160-L166