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? On Thu, Feb 21, 2013 at 11:55 PM, Craig White <[email protected]> wrote: > On Feb 21, 2013, at 8:30 AM, Huiming Teo wrote: > >> Hi, >> >> Is there a way to tell Capistrano to load or source /etc/profile ? >> >> I'm setting up a Ubuntu server, with rbenv installed system-wide. rbenv is >> initialized via /etc/profile.d/rbenv.sh. >> >> Ruby environment is not available when /etc/profile is not loaded. I >> understand Capistrano doesn't load /etc/profile, but is there a way to make >> it happens? > ---- > I found that adding this near the top of the deploy script should handle it… > > default_run_options[:shell] = '/bin/bash --login' > > Craig > > -- > -- > * You received this message because you are subscribed to the Google Groups > "Capistrano" group. > * To post to this group, send email to [email protected] > * To unsubscribe from this group, send email to > [email protected] 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 [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > > -- Huiming -- -- * You received this message because you are subscribed to the Google Groups "Capistrano" group. * To post to this group, send email to [email protected] * To unsubscribe from this group, send email to [email protected] 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 [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
