I upgraded my Rails app to 3.2.2 and was doing a deploy via Capistrano and during the bundler install process the deploy bombed out with the following error:
** [out] ArgumentError: invalid byte sequence in US-ASCII
** [out] An error occured while installing will_paginate (3.0.3), and Bundler cannot continue.
** [out] Make sure that `gem install will_paginate -v '3.0.3'` succeeds before bundling.
I think the reference to will_paginate is really a red-herring. Anyways, the solution is to properly set the default environment in Capistrano which gets passed to the environment that Capistrano+Bundler use in the deploy.
Specifically you need to set the
Add this to your Capfile. Note that the PATH is not strictly necessary, but I had that block in there already.