Use this: https://github.com/wayneeseguin/rvm-capistrano  

Works like a charm. :)  

- cassiano


On Friday, February 22, 2013 at 05:28, Lee Hambley wrote:

> Only that it's a less clean environment. Doesn't RVM include a package for 
> Capistrano so that one doesn't have to cross the streams?
>  
> (chiefly, if you load your dotfiles, what's to say "git" isn't an alias for 
> something else, or that `ls` works the same way, or that your path isn't 
> hugely modified… it's better to let cap run in a clean environment as it was 
> designed to do. Tools like RVM are hacks, because Ruby doesn't provide a 
> decent way to switch envs, and play nicely with other versions of itself. 
> This is fairly normal as far as scripting languages go, but by and large, if 
> you use a binstubs approach, which I'm sure rvm supports, and export the 
> correct two/three environmental variables, then rvm should work just fine.)  
>  
> Lee Hambley
> --
> http://lee.hambley.name/
>  
>  
>  
> On 21 February 2013 23:44, Teo Hui Ming <[email protected] 
> (mailto:[email protected])> wrote:
> > 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] 
> > (mailto:[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] 
> > > (mailto:[email protected])
> > > * To unsubscribe from this group, send email to 
> > > [email protected] 
> > > (mailto:capistrano%[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] 
> > > (mailto:capistrano%[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] 
> > (mailto:[email protected])
> > * To unsubscribe from this group, send email to 
> > [email protected] 
> > (mailto:capistrano%[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] 
> > (mailto:capistrano%[email protected]).
> > For more options, visit https://groups.google.com/groups/opt_out.
> >  
> >  
>  
> --  
> --  
> * You received this message because you are subscribed to the Google Groups 
> "Capistrano" group.
> * To post to this group, send email to [email protected] 
> (mailto:[email protected])
> * To unsubscribe from this group, send email to 
> [email protected] 
> (mailto:[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] 
> (mailto:[email protected]).
> For more options, visit https://groups.google.com/groups/opt_out.
>   
>   

-- 
-- 
* 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.


Reply via email to