Thanks Craig, it works!
$ ssh host1 'bash -l -c "echo \$PATH && ruby --version"'
/opt/rbenv/shims:/opt/rbenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
ruby 1.9.3p385 (2013-02-06 revision 39114) [x86_64-linux]
Is there any disadvantage to run Capistrano in bash login shell?
> --
> --
> * You received this message because you are subscribed to the Google Groups "Capistrano" group.
> * To post to this group, send email to
capis...@googlegroups.com
> * To unsubscribe from this group, send email to
capistrano+...@googlegroups.com For more options, visit this group at
http://groups.google.com/group/capistrano?hl=en
> ---
> You received this message because you are subscribed to the Google Groups "Capistrano" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
capistrano+...@googlegroups.com.
> For more options, visit
https://groups.google.com/groups/opt_out.
>
>
--
Huiming