I was getting the following error whenever I tried to deploy with Capistrano:
** [deploy:update_code] exception while rolling back: Capistrano::ConnectionError, connection failed for: 10.180.82.250 (ArgumentError: invalid byte sequence in US-ASCII) connection failed for: 10.180.82.250 (ArgumentError: invalid byte sequence in US-ASCII)
But after researching I found out that the problem was on some gem’s file and the fix is pretty simple, all you need to do is:
$ export LANG=en_US.UTF-8
$ export LC_ALL="en_US.UTF-8"
The lines above will force the file system to use UTF-8 and bundle will use UTF-8 for all the gems.
Update: Is better to add the export properties above to your ~/.bash_profile (or ~/.zshrc) otherwise you will have to do the above steps whenever you want to bundle.