Capistrano deploy not working with set :rvm_map_bins added

I have an odd issue which is just annoying to work around…

When I use Capistrano to pull down my production database for debugging I have to have the following line in my deploy.rb file or I get an error with SSHKit…

set :rvm_map_bins, %w[gem rake ruby rails bundle]

However if I try to deploy to production with that line added I get an error saying Capistrano can’t find bundle…

I think the issue is with the Capistrano DB tools but I am not sure what the problem could be…

Has anyone had a similar issue?

John