capistrano/rails — pull request #20 by Kriechi (2013-10-11 08:05:38+00:00)
Title: using special execute for bundled gems

proposing this way of solving the rails-bundler-command problem.
Just a proposal, no tests or further thoughts spent.

We should make sure that every future gem working with capistrano using a bundled gem is using the `execute_bundled` command. Maybe the method is suited better somewhere else.
Could solve at least the most easiest interaction for Rails deployments.

This way, if we use bundler, the rake-command is called through the `bundle exec`.
`bundle` on the other hand is called via RVM/rbenv after that with the command_map of SSHKit.

In my opinion the special bundler support should be removed from the rbenv gem. Just handle the case if bundler-gem is loaded, the pass the `bundle` call through rbenv, nothing more (like the RVM gem currently does).