[capistrano] Re: Weird escape characters in commands

2011-03-19 Thread Chris Benes
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 rail

[capistrano] Re: Weird escape characters in commands

2011-03-18 Thread Chris Benes
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 wrote: > The reason I did > > default_run_options[:pty] = true > > was that I read somewhere

[capistrano] Re: Weird escape characters in commands

2011-03-18 Thread Chris Benes
Lee... You also mentioned previously you "use monit to watch my deploy files, and restart daemons if the configs (which are deployed with the app) change." Are you running monit to watch the config files on the target machine? Or development? Might seem like a silly question but I wanted to be

[capistrano] Re: Weird escape characters in commands

2011-03-18 Thread Chris Benes
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 tar

Re: [capistrano] Re: Weird escape characters in commands

2011-03-18 Thread Lee Hambley
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 p

[capistrano] Re: Weird escape characters in commands

2011-03-18 Thread Chris Benes
Oh and the target machine is OS X Server 10.6.6. My local machine is OS X 10.6.6. On Mar 18, 3:34 am, Lee Hambley wrote: > Strange, .bashrc isn't supposed to be run, unless you set ssh_options[:pty] > (usually a bad idea) or reset the shell command to be `/bin/bash` (it > defaults to sh, to rule

[capistrano] Re: Weird escape characters in commands

2011-03-18 Thread Chris Benes
Lee... In my deploy.rb file I have: default_run_options[:pty] = true Is that the bad idea to which you refer? I may also have set the default shell to /bin/bash for the user I'm using on the server to execute the cap commands. Is it best practice to leave the default as "sh" and to set it manu

Re: [capistrano] Re: Weird escape characters in commands

2011-03-18 Thread Lee Hambley
Strange, .bashrc isn't supposed to be run, unless you set ssh_options[:pty] (usually a bad idea) or reset the shell command to be `/bin/bash` (it defaults to sh, to rule out individual differences) What OS is the target server? (and your local machine?) - Lee -- * You received this message beca

[capistrano] Re: Weird escape characters in commands

2011-03-17 Thread Chris Benes
All... The issue is resolved! It was that I had some fancy coloring options in my .bashrc in the account on the production server that was being used to deploy. export CLICOLOR=1 # use yellow for directories export LSCOLORS=dxfxcxdxbxegedabagacad Commenting out the above two lines resolved the

Re: [capistrano] Re: Weird escape characters in commands

2011-03-17 Thread Rafa García
Hi Chris, Could you put your shell(/bin/sh) configurations? It's to try to see why escape terminal codes Good night 2011/3/18 Chris Benes > Lee... > > Why would it be bundle? Isn't capistrano just passing the command > string to the remote server and bundle is a parameter of that string? >

[capistrano] Re: Weird escape characters in commands

2011-03-17 Thread Chris Benes
Lee... Why would it be bundle? Isn't capistrano just passing the command string to the remote server and bundle is a parameter of that string? Prior non-bundle commands work fine though. Chris On Mar 17, 5:42 pm, Lee Hambley wrote: > \e[33m > > is the terminal escape code for `brown` text… I

[capistrano] Re: Weird escape characters in commands

2011-03-17 Thread Chris Benes
I do - 1.0.10. Made some progress. I confirmed I could run a "rvm info" cap task on the server. I added: [[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" and it then got as far as this: * executing "bundle install --gemfile /Library/WebServer/sites/ vusion/releases/\e[33m2011

Re: [capistrano] Re: Weird escape characters in commands

2011-03-17 Thread Rafa García
Hi, Have you got bundler installed as gem in the server? I say it because I read: ** [out :: 75.149.217.83] sh: bundle: command not found Regards 2011/3/17 Lee Hambley > \e[33m > > is the terminal escape code for `brown` text… I have no idea where that's > coming from - first thought it so

Re: [capistrano] Re: Weird escape characters in commands

2011-03-17 Thread Lee Hambley
\e[33m is the terminal escape code for `brown` text… I have no idea where that's coming from - first thought it something in your shell profile contaminating the return of your shell commands. It could also just be bundler… in which case, check with them on their mailing list! - Lee -- * You re

[capistrano] Re: Weird escape characters in commands

2011-03-17 Thread Chris Benes
Well, the error is still there even after I installed Passenger and it seems to be working fine. This is generated after I enter "cap deploy" * executing "bundle install --gemfile /Library/WebServer/sites/ vusion/releases/\e[33m20110317223132\e[39;49m\e[0m/Gemfile --path / Library/WebServer/sit

[capistrano] Re: Weird escape characters in commands

2011-03-17 Thread Chris Benes
Thanks - good to know! I'm going to march forward and install Passenger and see what happens. Chris On Mar 17, 11:50 am, Lee Hambley wrote: > You're missing your application server, whatever you prefer to use, the > script/spin you're seeing was bundled with old versions of Rails, a way to > us

Re: [capistrano] Re: Weird escape characters in commands

2011-03-17 Thread Lee Hambley
You're missing your application server, whatever you prefer to use, the script/spin you're seeing was bundled with old versions of Rails, a way to use mongrel clusters to run your application, it's the Capistrano default… but *nobody* uses deploy:cold or mongrel clusters anymore! Your application

[capistrano] Re: Weird escape characters in commands

2011-03-17 Thread Chris Benes
I'm using Apache. So after I've done my deploy:check, what is the recommended sequence of commands to deploy the app to the main server? And you mention Phusion Passenger. Do I need this? I was under the impression that to get rails deployed and running on a production server running Apache and

Re: [capistrano] Re: Weird escape characters in commands

2011-03-17 Thread Lee Hambley
It depends entirely on your stack, if you're using passenger and apache (or nginx) there is no `start`, so there's no `cold`, and there's often no explicit restart (I use monit to watch my deploy files, and restart daemons if the configs (which are deployed with the app) change. - Lee -- * You r

[capistrano] Re: Weird escape characters in commands

2011-03-17 Thread Chris Benes
BTW - what sequence of commands do you use to deploy a new project? On Mar 17, 3:14 am, Lee Hambley wrote: > Can you do an `ls` on the server (and rule out odd escape characters > server-side)… I'll check the Gem, but I've had no problems (admittedly, I > don't `deploy:cold`) > > - Lee -- * You

Re: [capistrano] Re: Weird escape characters in commands

2011-03-17 Thread Lee Hambley
script/spin is *massively* out of date, (think… Early, Early Rails 2.x) - if you need it (a lot still do) you need the scripts linked from the wiki, else you need to override `deploy:start` with whatever makes sense for your environment. (and I meant run an `ls` in the releases directory of one of

[capistrano] Re: Weird escape characters in commands

2011-03-17 Thread Chris Benes
Thanks Lee. What do you mean by "ls?" List a directory? Which one? It was suggested to me to do a deploy:cold on an IRC rails channel because deploy:start failed with the following error: failed: "env PATH=/usr/local/git/bin:$PATH sh -c 'cd /Library/ WebServer/sites/vusion/current && nohup sc