Well I figured it all out in part using the rvm plugin for capistrano
in my deploy.rb file.  If anyone is interested below is a link to my
deploy.rb.  One of my next goals is to make the deploy.rb file project
agnostic by creating a capistrano gem.  That's AFTER I get the first
iteration of my rails app done.  :)

I think this approach follows best practices by not requiring any dot
files to be added and/ or modified on the target machine and 'sh' is
used, not bash.  It wouldn't be best practice to assume bash is the
shell used in the deploy account nor would it be best practice to
assume that account has a .bashrc and/or .bash_profile with certain
settings that are often advocated to be used with rvm and capistrano.

https://gist.github.com/877295

Chris

On Mar 18, 9:41 pm, Chris Benes <chris.be...@rvibe.com> wrote:
> Maybe this is the answer...
>
> Manually set the PATH environment variable in the deploy file:
>
> default_environment['PATH'] = "/your/path/to/git:/and/any/other/path/
> you/need"
>
> On Mar 18, 7:51 pm, Chris Benes <chris.be...@rvibe.com> wrote:
>
>
>
> > The reason I did
>
> > default_run_options[:pty] = true
>
> > was that I read somewhere that it "Must be set for the password prompt
> > from git to work".
>
> > I removed it and I'll see what happens.
>
> > Additionally, after defaulting to the base 'sh', I'm getting an error
> > indicating "bundle" can't be found on the target machine so the
> > bundall install is not executing.
>
> > What is the best practice way for the $PATH variable to be set
> > correctly so bundle and other commands initiated by capistrano on the
> > target can find their needed files, e.g. project source, gems,
> > commands themselves like bundle, etc.
>
> > Previously, I had the $PATH variable set in the .bashrc.  Is best
> > practice to set it in the .profile for 'sh'?
>
> > Thanks,
> > Chris
>
> > On Mar 18, 6:45 pm, Lee Hambley <lee.hamb...@gmail.com> wrote:
>
> > > default_run_options[:pty] = true
>
> > > Will (probably) run login scripts (under some shells.) which usually
> > > pollutes the environment, and causes problems, it's often a bad idea.
>
> > > Forcing the shell to bash makes it more likely that login scripts will be
> > > picked up, further polluting the environment, see point 1 :)
>
> > > (sometimes it works for people, more often than not… it doesn't - which is
> > > why they're not the defaults!)
>
> > > - Lee

-- 
* You received this message because you are subscribed to the Google Groups 
"Capistrano" group.
* To post to this group, send email to capistrano@googlegroups.com
* To unsubscribe from this group, send email to 
capistrano+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/capistrano?hl=en

Reply via email to