[capistrano] Re: SSH Timeouts for Long Running Migrations

2009-10-21 Thread Jamis Buck
To be entirely honest, I almost never run my migrations via capistrano anymore. I've been burned too many times by issues that come up during a migration, that need manual intervention, so I usually do: $ cap deploy:update $ ssh to one of the app servers and run the migrations $ cap

[capistrano] Re: Best way to trim duplicate hosts in a given role

2009-10-09 Thread Jamis Buck
It shouldn't matter, actually, since Capistrano will only connect to distinct hosts. Consider the case where a host exists in two different roles (e.g. :web and :app). Tasks set to run on both :web and :app would get that host twice in the resulting host list, so Capistrano has to make sure and

[capistrano] Re: How to Specify local and remote repository locations?

2009-09-17 Thread Jamis Buck
What happens if you use /path/to/repo.git instead of file:///path/to/repo.git? I know I've used local repositories with Capistrano without problem in the past (as long as I'm using a deployment method that doesn't require the remote hosts to access the repository). - Jamis On Thu, Sep 17, 2009

[capistrano] Re: Always checks out branch 'deploy'

2009-09-16 Thread Jamis Buck
Nick, It's not checking out out a remote branch named deploy. It's creating a new local branch called deploy, and then hard resetting it to the revision you requested to deploy (e.g. HEAD on master, or whatever). e.g. git checkout deploy Would checkout an existing branch called 'deploy'.

[capistrano] Re: Custom TaskDefinition classes

2009-08-26 Thread Jamis Buck
Tasks aren't executed within the scope of their task definition, which means adding methods to TaskDefinition won't help you (the new methods won't be accessible to the task). Tasks are added to the current namespace instance, which is also where custom methods are added. Thus: task :foo do

[capistrano] Re: release_path == current_path.symlink

2009-07-26 Thread Jamis Buck
release_path is recomputed every time Capistrano is invoked, and is only valid for a deploy that is IN PROGRESS. current_path, on the other hand, always points to the 'current' symlink. current_release is always the most recent release in the releases directory. Lastly, latest_release is the

[capistrano] Re: Identify current host

2009-07-06 Thread Jamis Buck
On Mon, Jul 6, 2009 at 9:06 AM, Gary Richardsongary.richard...@gmail.com wrote: Hmm. That's odd..$CAPISTRANO:HOST$ wasn't working for me on Friday. Must be them gremlins. Is there another variable I can use to get the current host in the ruby code? This is what I'm trying to do: Short

[capistrano] Re: Deploying without SCM

2009-07-02 Thread Jamis Buck
There is also a :none SCM that you can use. However, it only works with the :copy deployment method that Lee mentioned. So: set :repository, . set :scm, :none set :deploy_via, :copy You can read more about the :none SCM in the comments for that module:

[capistrano] Re: Multistage deploy does not seem to be reading stage-specific files

2009-06-23 Thread Jamis Buck
Try this: role(:web) { [domain, {:primary = true}] } In other words, the block should return an array corresponding to the arguments you would normally have passed to role(). The first _n_ elements of the array are domain names to assign to the given role, and the last option may be a hash

[capistrano] Re: Ruby (Capsitrano) Returning Incorrect Exit Code

2009-06-17 Thread Jamis Buck
I'd be really curious to see the full output of a Capistrano run that appeared to complete successfully, and yet terminated with a non-zero exit code. - Jamis On Wed, Jun 17, 2009 at 4:03 AM, Lee Hambleylee.hamb...@gmail.com wrote: Hey, Someone (joe?) was hanging out in IRC last night asking

[capistrano] Re: Ignoring lost+found as a release name

2009-06-16 Thread Jamis Buck
The problem is that cap has to accomodate the lowest common denominator, and not every ls supports -r, or -1. - Jamis On Tue, Jun 16, 2009 at 1:20 PM, Robrob.biedenh...@gmail.com wrote: OK, in the latest release the code is: _cset(:releases) { capture(ls -xt #{releases_path}).split.reverse }

[capistrano] Re: command line arguments

2009-06-13 Thread Jamis Buck
Yeah, that post describes capistrano 1.x behavior. The same thing in cap2 would be something like: p option1 is #{opt1} if exists?(:opt1) - Jamis On Sat, Jun 13, 2009 at 10:29 AM, kennykennethst...@gmail.com wrote: from here:  http://ryandaigle.com/archives/2007/6 you could check if a

[capistrano] Re: No ftp transport?

2009-06-03 Thread Jamis Buck
FTP was not included for a variety of reasons. Capistrano is built on top of SSH, and everything it uses to communicate with the servers runs over that transport (e.g., SSH itself, SFTP, and SCP). To add FTP would require a significant change to how parallel commands are processed. (It would

[capistrano] Re: No ftp transport?

2009-06-03 Thread Jamis Buck
On Wed, Jun 3, 2009 at 8:53 AM, Byron Saltysiak byronsa...@gmail.com wrote: I'm only interested in using ftp to upload. It seems like it could be added to that single command without requiring any changes to running commands. I haven't delved too deeply yet so let me know if this is crazy

[capistrano] Re: No ftp transport?

2009-06-03 Thread Jamis Buck
On Wed, Jun 3, 2009 at 9:05 AM, Byron Saltysiak byronsa...@gmail.com wrote: Unfortunately, I'd already tried ssh and it's not allowing it. I've requested the ability to scp or sftp but we'll see. I have a feeling this box was setup as ftp only for some purpose (perhaps 3rd party integration

[capistrano] Re: Deploying to multiple hosts with one after deploy... callback

2009-06-01 Thread Jamis Buck
Also, to execute a task only on (for instance) the hosts that have :primary = true defined: task :foo, :roles = :web, :only = { :primary = true } do # ... end That'll run on all hosts in the web role that have :primary = true set. - Jamis On Mon, Jun 1, 2009 at 11:59 AM, Lee Hambley

[capistrano] Re: Preventing parallel execution on the same host (under two names)

2009-05-27 Thread Jamis Buck
My recommendation: keep the host names distinct, and just use roles to indicate different purposes of identical hosts. Thus, you'd have host1 in both the app and loadbalancer roles. Personally, I've used the fact that Capistrano does NOT resolve host names early. It's great for testing recipes,

[Capistrano] Re: backticks being ignored

2009-05-19 Thread Jamis Buck
The reason it is escaped is because Capistrano invokes the command via 'sh' (by default). E.g., the following run command: run echo today is `date` Gets translated into the following shell command: sh -c echo today is \`date\` The backticks need to be escaped so that they get evaluated

[Capistrano] Re: backticks being ignored

2009-05-19 Thread Jamis Buck
Maybe it's something with that version of GNU bash? This one works for me: $ sh --version sh --version GNU bash, version 3.2.17(1)-release (i386-apple-darwin9.0) Copyright (C) 2005 Free Software Foundation, Inc. It also works fine with the posix shell in Ubuntu (not sure which version of

[Capistrano] Re: backticks being ignored

2009-05-19 Thread Jamis Buck
I'll bet it's tcsh. Capistrano calls sh -c ... specifically to work around issues with non-posix shells; it sure sucks when those non-posix shells make it impossible to make posix calls. I'm afraid it's looking like your only option is going to be to change your default shell to something

[Capistrano] Re: backticks being ignored

2009-05-19 Thread Jamis Buck
It's only possible if you are using an interactive (e.g., login) shell with SSH, and Capistrano is not. Believe me, I've explored and explored this, trying to find ways to make Capistrano friendly to non-posix shells, and sh -c ... is the closest I got. - Jamis On 5/19/09 2:25 PM, Scott

[Capistrano] Re: backticks being ignored

2009-05-19 Thread Jamis Buck
to github scottj97/capistrano. On 19 May, 13:30, Jamis Buck jamis.b...@gmail.com mailto:jamis.b...@gmail.com wrote: It's only possible if you are using an interactive (e.g., login) shell with SSH, and Capistrano is not. Believe me, I've explored and explored

[Capistrano] Re: backticks being ignored

2009-05-19 Thread Jamis Buck
Ah! I think I may have found a work-around. If you use single-quotes instead of double-quotes, the string isn't immediately interpolated, so: sh -c 'echo I need some `help`' appears to work, even if the calling shell is tcsh. Can you verify? - Jamis On 5/19/09 7:27 PM, Scott Johnson

[Capistrano] Re: backticks being ignored

2009-05-19 Thread Jamis Buck
On 5/19/09 9:03 PM, Scott Johnson wrote: I will try that and get back to you... The root problem here is that the SSH exec request parses the supplied command using the user's default shell, which is uncontrollable. Is that right? Right. What if we did SSH exec of sh (without -c), then

[Capistrano] Re: backticks being ignored

2009-05-19 Thread Jamis Buck
On 5/19/09 9:48 PM, Scott Johnson wrote: I agree 100%. But unfortunately neither of those options is good for me; the backticks are in the built-in deployment recipes (specifically deploy:rollback:cleanup and the Perforce p4client_root). And my default shell is tcsh because of an

[Capistrano] Re: Running a task without callbacks

2009-05-12 Thread Jamis Buck
Looks like the documentation is ambiguous. What it means is, that particular version of the method doesn't invoke the callbacks. However, Capistrano also loads the Callbacks module (capistrano/callbacks.rb), which overrides the invoke_task_directly method to decorate it with the callback

[Capistrano] Re: Running a task without callbacks

2009-05-12 Thread Jamis Buck
The task call frames are used primarily for rolling back (on rollback, that stack is walked). Also, it lets you programmatically infer which task is currently being executed. As far as I can remember, nothing in Capistrano itself should break if you are invoking the task directly, but there

[Capistrano] Re: Using Capistrano to Perform SQL operations

2009-05-05 Thread Jamis Buck
Another way to think of Capistrano is as automated SSH. If you can do it via an SSH command-line, then you can do it via Capistrano. - Jamis On 5/5/09 2:55 PM, Rafael G. wrote: liquid_rails wrote: Do Capistrano and Phusion's Passenger do the same thing? No, Passenger(aka mod_rails) is an

[Capistrano] Re: running multiple commands in sudo mode

2009-04-28 Thread Jamis Buck
The preferred way of doing sudo is by embedding #{sudo} in your run command. invoke_command() and sudo() are both otherwise not recommended. So, to do sudo with multiple commands: run cd #{latest_release}; #{sudo} bin/merb #{merb_options} - Jamis On 4/28/09 5:13 PM, Lee Hambley wrote:

[Capistrano] Re: running multiple commands in sudo mode

2009-04-28 Thread Jamis Buck
As before, with the :as option: run cd #{latest_release}; #{sudo :as = bob} bin/merb #{merb_options} - Jamis On 4/28/09 6:52 PM, Mr_Tibs wrote: Thanks Jamis. I'm only using sudo because I want that command to be run by a different user. How would I specify the user's name in the example

[Capistrano] Re: Roll back of a migration

2009-04-27 Thread Jamis Buck
On 4/27/09 4:31 AM, Lee Hambley wrote: Jacobo, You may need to implement something like the following pesudocode: * http://pastie.org/459506 Be very careful, though, because migrations are not (in general) reversible. Specific migrations may be, but the only way to be 100% sure of a

[Capistrano] Re: I seem to have to delete the cached_copy folder every time I want to deploy

2009-04-27 Thread Jamis Buck
What version of git do you have on your server? - Jamis On 4/27/09 7:05 PM, chris wrote: http://pastie.org/460525 it seems that it is on the git fetch origin git reset --hard that it dies. On Apr 27, 3:26 am, Lee Hambleylee.hamb...@gmail.com wrote: Chris, What error are you getting?

[Capistrano] Re: Deployment through a gateway

2009-04-23 Thread Jamis Buck
On 4/23/09 2:11 AM, martins wrote: Jamis, It does not work with the -N option, I´m not getting the login prompt on the gateway. Right...that's the point. All you need the gateway for is the tunnelled connection in the next command. You don't need the shell. So you do it with the -N, like

[Capistrano] Re: Server tries to pull from old git repo on deployment

2009-04-23 Thread Jamis Buck
The easiest thing to do is to just blow away the cached-copy directory on all your deployment servers, and redeploy: rm -rf /var/rails/app_name/shared/cached-copy Deleting that directory will have no effect on your running application. It will just cause capistrano to reclone your

[Capistrano] Re: Deployment through a gateway

2009-04-22 Thread Jamis Buck
Gateway access via capistrano is not the same as logging into the target machine from the gateway machine. What capistrano does is open a forwarded connection from your workstation directly to the target machine, via the gateway. It's the same as doing something like this: # in one

[Capistrano] Re: conditional tasks depending on environment ? (using cap-ext)

2009-04-17 Thread Jamis Buck
what I think is the relevant data (relevant chunks of deploy.rb, and the stage files) at http://pastie.org/449514 This is on os X, I've checked file permissions, everything *should* be in order. On Apr 16, 10:33 pm, Jamis Buck jamis.b...@gmail.com wrote: On 4/16/09 11:26 PM, Ivar Vasara wrote

[Capistrano] Re: conditional tasks depending on environment ? (using cap-ext)

2009-04-16 Thread Jamis Buck
Each stage essentially becomes it's own task, so in order to invoke a task in the environment of a particular stage, you need to specify that stage: cap production deploy cap staging deploy:pending etc. - Jamis On 4/16/09 6:22 PM, Ivar Vasara wrote: Jamis, That looks like a perfect

[Capistrano] Re: scm_command

2009-04-01 Thread Jamis Buck
You can actually already do that, Andrei: set :scm_command, /opt/local/bin/git set :local_scm_command, git - Jamis On 4/1/09 7:47 AM, Andrei wrote: I try to deploy an application on a shared environment on which I installed git. I have added the path to bashrc, but this would work

[Capistrano] Re: Namespace collision error with frozen Capistrano

2009-04-01 Thread Jamis Buck
Rake doesn't add it to Capistrano, it adds it to Object, so that you can call FileUtils.symlink without the FileUtils prefix. It's pretty unfortunate, and I don't know of a good way to work around it, sadly. - Jamis On 4/1/09 5:41 PM, Sarah Mei wrote: The operations folks at my company would

[Capistrano] Re: git remote_cache: why not checkout from a bare/mirrored repository?

2009-03-19 Thread Jamis Buck
There's no reason you need to copy the .git directory. Just set :copy_exclude to %w(.git) and it should ignore that directory. As for why it's implemented the way it is: it's for compatibility with other SCM's. Git is not the only SCM capistrano supports, so the built-in deployment strategies

[Capistrano] Re: Detecting remote errors

2009-03-13 Thread Jamis Buck
On 3/13/09 9:14 AM, S. Robert James wrote: Does Capistrano check the exit status of the remote command (run method)? Yes. It will raise an exception if a command finishes with a non-zero exit status. I see that the deploy:setup task will run mkdir even the dirs already exist - this should

[Capistrano] Re: Detecting remote errors

2009-03-13 Thread Jamis Buck
a tinyurl: http://tinyurl.com/dm6wpg - Jamis On Mar 13, 11:40 am, Jamis Buck ja...@37signals.com wrote: On 3/13/09 9:14 AM, S. Robert James wrote: Does Capistrano check the exit status of the remote command (run method)? Yes. It will raise an exception if a command finishes with a non

[Capistrano] Re: cap deploy:cold hangs

2009-03-13 Thread Jamis Buck
You're going to need to include more of the output. What you've pasted in your original email does not tell us enough. Please try pasting the entire output (without ssh debugging output). - Jamis On 3/13/09 11:22 AM, Valafar wrote: I'm using Capistrano 2.5.5 and Git 1.5.6 as SCM to deploy my

[Capistrano] Re: cap deploy:cold hangs

2009-03-13 Thread Jamis Buck
Can you please include the *full* output? The entire thing? The abbreviated output you keep pasting is lacking potentially relevant information, making it very hard to help you. - Jamis On 3/13/09 12:00 PM, Valafar wrote: Oh, now it finally finished. After executing command: command

[Capistrano] Re: cap deploy:cold hangs

2009-03-13 Thread Jamis Buck
The error is here: ** [mysite.ath.cx :: err] ssh: connect to host mysite.ath.cx port 22: Connection timed out ** [mysite.ath.cx :: err] fatal: The remote end hung up unexpectedly command finished Apparently the ssh server at mysite.ath.cx is either not running, or is not running on port

[Capistrano] Re: how to setup capistrano for three tier behind firewall

2009-03-11 Thread Jamis Buck
The :db question has come up before on the list: essentially, the answer to why does my code have to be on the db server is it doesn't. Just set one of your app servers to be the primary db server. Capistrano only uses the :db role to determine where to run migrations. - Jamis On 3/11/09 9:21

[Capistrano] Re: Ensure connectivity before deploy

2009-03-11 Thread Jamis Buck
You could do something like this: task :ensure_connected do connect! end before deploy:update_code, ensure_connected The connect! method forces a connection to be opened all servers that match the given task. You can give arguments, too, so you can specify explicit roles, hosts, etc:

[Capistrano] Re: no such file to load -- capistrano/cli (LoadError)

2009-03-10 Thread Jamis Buck
The install is definitely broken. capistrano/cli.rb is one of the standard files for capistrano. Try uninstalling all installed versions of capistrano and reinstalling it. - Jamis On 3/10/09 9:13 AM, lamp5matt wrote: I found another thread here where someone got this error and solved it more

[Capistrano] Re: no such file to load -- capistrano/cli (LoadError)

2009-03-10 Thread Jamis Buck
Sounds like rubygems might not be loading. Try: export RUBYOPT=rubygems and see if that helps. (That will cause rubygems to be loaded automatically by Ruby.) - Jamis On 3/10/09 9:26 AM, lamp5matt wrote: I have now reinstalled capistrano 3 times. and chmod -R o+r /var/lib/gems/1.8/gems/

[Capistrano] Re: no such file to load -- capistrano/cli (LoadError)

2009-03-10 Thread Jamis Buck
On Mar 10, 9:44 am, Jamis Buck ja...@37signals.com wrote: Sounds like rubygems might not be loading. Try: export RUBYOPT=rubygems and see if that helps. (That will cause rubygems to be loaded automatically by Ruby.) - Jamis On 3/10/09 9:26 AM, lamp5matt wrote: I have now

[Capistrano] Re: Help with Capistrano on Multiple Servers

2009-03-08 Thread Jamis Buck
On 3/8/09 7:03 PM, S. Robert James wrote: Hi. We're beginning to scale our Capistrano config to multiple servers, and I've gotten stuck on a few points: 1. My understanding is that tasks themselves run only once, no matter how many servers and roles we have defined, just that run, sudo,

[Capistrano] Re: Capistrano Idioms

2009-03-08 Thread Jamis Buck
On 3/8/09 7:46 PM, S. Robert James wrote: Is there a standard Capistrano idiom for passing in, and parsing, user defined parameters from the command line? I know vars can be set using -S. But I'd like more: supporting boolean switches, or switches with a default val. If I was writing my own

[Capistrano] Re: copy_exclude seemingly having no effect

2009-03-06 Thread Jamis Buck
Try: set :copy_exclude, [**/.svn] - Jamis On 3/6/09 1:16 AM, Yevgeniy A. Viktorov wrote: Hello, I have exactly same behavior with Capistrano v2.5.4 Is there any solution? :) Thanks. On 11 Чер 2008, 06:43, JBB jay.borenst...@gmail.com wrote: With v2.3 I have the following in

[Capistrano] Re: Help with custom task (moving contents of current)

2009-03-05 Thread Jamis Buck
I would strongly recommend that you not use the standard deploy tasks, and just write your own. - Jamis On 3/5/09 12:16 PM, goodieboy wrote: Hi, I have a repo that's a simple static site. The trunk is the websites document root. I need to deploy this site to a server that has current/ www

[Capistrano] Re: Help with custom task (moving contents of current)

2009-03-05 Thread Jamis Buck
... Matt On Mar 5, 2:36 pm, Jamis Buck ja...@37signals.com wrote: I would strongly recommend that you not use the standard deploy tasks, and just write your own. - Jamis On 3/5/09 12:16 PM, goodieboy wrote: Hi, I have a repo that's a simple static site. The trunk is the websites

[Capistrano] Re: sftp failures on media temple

2009-03-04 Thread Jamis Buck
You'll need to override the deploy:symlink task to do that. - Jamis On 3/4/09 2:28 PM, mkrisher wrote: Thanks Jamis. That helped! Now I just need to control the current symlink to be relative to the directory rather than using the whole deploy path. Something like:

[Capistrano] Re: a suggestion idea

2009-03-03 Thread Jamis Buck
You can create separate tasks, but then call them from a single meta copyconfig task: task :copyconfig_app, :roles = appservers do end task :copyconfig_db, :roles = dbservers do end task :copyconfig do copyconfig_app copyconfig_db end - Jamis On 3/3/09 10:26 AM, Gerhardus

[Capistrano] Re: sftp failures on media temple

2009-03-02 Thread Jamis Buck
You need to specify the absolute path for the :deploy_to variable. SFTP (the protocol) does not understand what the tilde character means, since it is not a shell command. - Jamis On 3/2/09 8:13 PM, mkrisher wrote: I have been trying to use Cap to deploy a PHP site to the media temple Grid

[Capistrano] Re: major problems with simple code update from local git repo

2009-02-28 Thread Jamis Buck
The checkout is never run via sudo. You need to make sure the permissions on the directories created by deploy:setup are such that your deploy user can create files in them without using sudo. - Jamis On 2/28/09 7:50 AM, j0llyr0g3r wrote: Hey guys, i am fairly new to capistrano. I am

[Capistrano] Re: major problems with simple code update from local git repo

2009-02-28 Thread Jamis Buck
Using file:// repos introduces issues of it's own. Search the list for workarounds--it's come up pretty frequently. - Jamis On 2/28/09 8:22 AM, j0llyr0g3r wrote: Hi Jamis and thanks for the tip. Unfortunately all my directories already have a 777-mask (did that out of frustration) so this

[Capistrano] Re: Capistrano maintainership

2009-02-26 Thread Jamis Buck
On 2/26/09 2:18 PM, Lee Hambley wrote: Hey Jamis, I never actually bothered to check, I figured it was served from the github gem server -- completely agree with your last statement about people not really taking much interest in hacking the core before, there's no reason that people

[Capistrano] Re: Capistrano maintainership

2009-02-26 Thread Jamis Buck
On 2/26/09 2:27 PM, Jonathan Weiss wrote: Lee Hambley wrote: My only concern would be that there is no more single place to go to get a copy, get info and learn about it, a bunch of similarly named forks, with similar feature sets would just cause trouble :) I don't think this will

[Capistrano] Re: Capistrano maintainership

2009-02-26 Thread Jamis Buck
gems are prefixed with the username (e.g. jamis-capistrano, if my cap repo were configured to serve gems). - Jamis - Lee 2009/2/26 Jamis Buck ja...@37signals.com mailto:ja...@37signals.com On 2/26/09 2:27 PM, Jonathan Weiss wrote: Lee Hambley wrote: My only concern

[Capistrano] Re: Permission denied, please try again.

2009-02-25 Thread Jamis Buck
Hey, Looking at the output: ** [domain.com :: err] Permission denied, please try again. ** [domain.com :: err] Permission denied, please try again. ** [domain.com :: err] Received disconnect from 99.99.99.99: 2: Too many authentication failures for git ** [domain.com :: err] fatal: The

[Capistrano] Re: `require': no such file to load -- rubygems

2009-02-21 Thread Jamis Buck
What about which rake? If I had to guess, I'd say you've got at least two different ruby installations on that server, and the shebang line in whichever rake is being run is pointing to the OTHER ruby installation, the one the doesn't have rubygems installed. - Jamis On 2/21/09 9:48 AM,

[Capistrano] Re: writing a preflightcheck task

2009-02-20 Thread Jamis Buck
If an exception is raised, it does not cause a task to return a value; it causes a task to raise an exception. You need to use a begin/rescue clause, instead of an unless condition. begin some.task rescue Exception = e puts got exception: #{e} end Does that make sense? Exceptions

[Capistrano] Re: logger vs puts

2009-02-20 Thread Jamis Buck
it more clear. Regars On Feb 20, 6:05 pm, Jamis Buck ja...@37signals.com wrote: Using logger appropriately will let your own log statements display or hide based on the -v switch for Capistrano. See capistrano/logger.rb for the source. - Jamis On 2/20/09 11:00 AM, Gerhardus Geldenhuis

[Capistrano] Re: Error deploying with Capistrano

2009-02-20 Thread Jamis Buck
Sounds like there's a syntax error one line one of /etc/profile.d/ruby.sh? - Jamis On 2/20/09 11:29 PM, Jaryl Sim wrote: I forgot to mention that I am deploying from a Vista machine to a CentOS box. On Feb 21, 2:18 pm, Jaryl Sim quantum.crus...@gmail.com wrote: Hi, I've never gotten such

[Capistrano] Re: retrieving current role name

2009-02-18 Thread Jamis Buck
There's really no such thing as a current role, since servers can exist in multiple roles simultaneously, and tasks can be executed on multiple roles simultaneously. In other words, in general, Capistrano can't know which role you mean for any particular server. The case where you're dealing with

[Capistrano] Re: fatal: could not create work tree dir '/home/user/app_name/shared/cached-copy'

2009-02-17 Thread Jamis Buck
not sure whats what yet and its confusing everything up. Could you give me a few directions I can try going into? Im on Slicehost by the way. Thanks! On Mon, Feb 16, 2009 at 8:40 PM, Jamis Buck ja...@37signals.com mailto:ja...@37signals.com wrote: It sounds like your git command

[Capistrano] Re: fatal: could not create work tree dir '/home/user/app_name/shared/cached-copy'

2009-02-17 Thread Jamis Buck
://github.com (port git_username) (Servname not supported for ai_socktype) *** Yeah the problem definitely lies with server github communication. Any tips? Thanks! On Wed, Feb 18, 2009 at 10:57 AM, Jamis Buck ja...@37signals.com mailto:ja...@37signals.com wrote

[Capistrano] Re: fatal: could not create work tree dir '/home/user/app_name/shared/cached-copy'

2009-02-17 Thread Jamis Buck
On 2/17/09 10:57 PM, Vinay Seshadri wrote: Whoops! sorry about that.. :D Well when I tried MY clone URL with the @, I get the same error cap gave me. git clone g...@github.com mailto:g...@github.com:git_username/ahref.in.git test_git_clone Initialized empty Git repository in

[Capistrano] Re: fatal: could not create work tree dir '/home/user/app_name/shared/cached-copy'

2009-02-17 Thread Jamis Buck
be well advised to look into? Thanks again Jamis! On Wed, Feb 18, 2009 at 11:30 AM, Jamis Buck ja...@37signals.com mailto:ja...@37signals.com wrote: On 2/17/09 10:57 PM, Vinay Seshadri wrote: Whoops! sorry about that.. :D Well when I tried MY clone URL with the @, I get

[Capistrano] Re: fatal: could not create work tree dir '/home/user/app_name/shared/cached-copy'

2009-02-16 Thread Jamis Buck
in between. The second one is actually the user's group, but on ubuntu users are in their own groups. That should make cap deploy work without errors. -Andrew On 13 Feb, 10:00, Jamis Buck ja...@37signals.com wrote: :use_sudo does not cause all commands to use sudo, only commands like deploy:setup

[Capistrano] Re: Spaces in Git Repository name..

2009-02-16 Thread Jamis Buck
On 2/15/09 11:05 PM, sergio_101 wrote: i am running a git repository that we hit via ssh. the problem is that the name of the directory has spaces in it... something like: /mnt/share/work server here/foo/bar i can't get deploy.rb to see the correct repository when doing:

[Capistrano] Re: staggered deploy revisited

2009-02-16 Thread Jamis Buck
If you want subtasks to use a particular host, you need to set the HOSTS or HOSTFILTER environment variables. E.g. find_servers(...).each do |server| ENV['HOSTFILTER'] = server.host sub.task.here ENV['HOSTFILTER'] = nil end It's extremely ugly and hacky and I don't like it, but

[Capistrano] Re: staggered deploy revisited

2009-02-16 Thread Jamis Buck
) Anyway just some random thoughts. Regards On Feb 16, 3:44 pm, Jamis Buck ja...@37signals.com wrote: On 2/16/09 8:37 AM, Gerhardus Geldenhuis wrote: Thanks, I am going to try that right now. How do you feel about a sequential extention to capistrano? Any thoughts on how it could fit

[Capistrano] Re: help with reaper not restart mongrel with the latest release path

2009-02-15 Thread Jamis Buck
cap deploy:restart should be restarting your app so that it picks up the new changes from the most recent deploy. I have no idea why it isn't. What version of Capistrano are you using? How are you starting the mongrels? - Jamis On 2/15/09 1:02 PM, Greg Hauptmann wrote: (bump) Maybe I should

[Capistrano] Re: Execute cap deploy:migrations fails

2009-02-14 Thread Jamis Buck
Maybe try putting a leading slash before 'home'? e.g. set :repository, #{us...@#{domain}:/home/#{user}/#{domain}/git/#{application}.git - Jamis On 2/14/09 6:50 PM, olivierntk wrote: Hi there, I am trying to deploy a rails app on dreamhost. Here is the error message that I get: fatal:

[Capistrano] Re: fatal: could not create work tree dir '/home/user/app_name/shared/cached-copy'

2009-02-13 Thread Jamis Buck
:use_sudo does not cause all commands to use sudo, only commands like deploy:setup and deploy:restart. The primary deploy methods (which copy the code to the server and update the symlink, etc.) are never run as sudo. I've mentioned this before on the list, but deploy:setup is kind of broken: if

[Capistrano] Re: Checking for variable existence

2009-02-13 Thread Jamis Buck
See the #exists?(:var) method: http://wiki.capify.org/article/Exists%3F Hope that helps, Jamis On 2/13/09 7:29 AM, Gerhardus Geldenhuis wrote: Hi I vaguely recall seeing a way to test for empty or non-existent variables but could not find it going through my archives. I want to know

[Capistrano] Re: Caching in Capistrano

2009-02-13 Thread Jamis Buck
$CAPISTRANO:HOST$ is not a variable; it simply gets gsubbed with the value of the current server name immediately before the command is handed off to the server. It will not be affected by caching. Caching only applies to variables set with a block, e.g. set(:releases) { capture(ls -xt

[Capistrano] Re: Capistrano::CLI to deploy from a rails instance gives 'the task `deploy' does not exist'

2009-02-13 Thread Jamis Buck
]).each { |recipe| config.load(recipe) } throws the ArgumentError Is there a good way to debug how the tasks are being loaded into the Capistrano::Configuration I am building? thanks, Michael On Feb 13, 1:23 am, Jamis Buck ja...@37signals.com wrote: If you're loading Capfile, you don't need

[Capistrano] Re: Capistrano::CLI to deploy from a rails instance gives 'the task `deploy' does not exist'

2009-02-13 Thread Jamis Buck
, restful_authentication, rspec, and rspec_on_rails. Just to be safe, I removed everything but the restful_authentication plugin but still got the ArgumentError. I have not defined any tail methods nor are there any I can find. thanks, Michael Jamis Buck wrote: So, regarding my last email, are you

[Capistrano] Re: Bug in deploy:migrations ?

2009-02-12 Thread Jamis Buck
Actually, current_release is correct. If you look at the definition for current_release: _cset(:current_release) { File.join(releases_path, releases.last) } Which returns the path of the last release in the releases directory: _cset(:releases) { capture(ls -xt

[Capistrano] Re: Capistrano::CLI to deploy from a rails instance gives 'the task `deploy' does not exist'

2009-02-12 Thread Jamis Buck
You need to load #{RAILS_ROOT}/Capfile, not #{RAILS_ROOT}/config/deploy.rb. Capfile loads both the default deploy recipes, as well as your app's deploy.rb - Jamis On 2/12/09 7:23 PM, Michael Guymon wrote: Hello Capistranians, I am trying to trigger a deploy from a Rails app using

[Capistrano] Re: Capistrano::CLI to deploy from a rails instance gives 'the task `deploy' does not exist'

2009-02-12 Thread Jamis Buck
On 2/12/09 9:17 PM, Michael Guymon wrote: I should have been more clear in the first place, I am actually trying to cap deploy another application from Rails, so it is trying to load a deploy.rb that is not in the RAILS_ROOT. In my rspec spec, if I load the Capfile first, then the external

[Capistrano] Re: capistrano 2.5.4 fails on ssh [SOLVED]

2009-02-12 Thread Jamis Buck
to determine the allowed methods/sequence to use. Hope this helps. Stefan On 11 Feb., 07:45, Jamis Buck ja...@37signals.com wrote: Weird... I have no idea why 2.5.4 isn't trying publickey by default for you. Capistrano should always be trying publickey first, then password. There's something

[Capistrano] Re: Capistrano::CLI to deploy from a rails instance gives 'the task `deploy' does not exist'

2009-02-12 Thread Jamis Buck
is loaded. The error we indicate a collision of some sort, like the deployer.rb is being loaded twice somehow? Here is a slimmed down version of the ruby I am attempt to execute from Rails: http://pastie.org/387991 thanks, Michael Jamis Buck wrote: On 2/12/09 9:17 PM, Michael Guymon wrote

[Capistrano] Re: Error after installing capistrano

2009-02-11 Thread Jamis Buck
On 2/11/09 1:18 PM, SteveS wrote: set :db, domain, :primary = true I believe you mean to use role() here, and not set(). role :db, domain, :primary = true - Jamis --~--~-~--~~~---~--~~ To unsubscribe from this group, send email to

[Capistrano] Re: capistrano 2.5.4 authentication failure works with 2.5.3

2009-02-11 Thread Jamis Buck
This looks suspicious to me: D, [2009-02-11T16:00:41.092822 #50594] DEBUG -- net.ssh.authentication.session[aa9baa]: trying pass connection failed for: sage.example.com (NameError: uninitialized constant Net::SSH::Authentication::Methods::Pass) Can you pastie your complete deploy.rb? I suspect

[Capistrano] Re: capistrano 2.5.4 authentication failure works with 2.5.3

2009-02-11 Thread Jamis Buck
# restart passenger to make it reload the application you are updating run passenger_reload_application_trigger_file_command end On Feb 11, 2009, at 4:30 PM, Jamis Buck wrote: This looks suspicious to me: D, [2009-02-11T16:00:41.092822 #50594] DEBUG -- net.ssh.authentication.session

[Capistrano] Re: capistrano 2.5.4 authentication failure works with 2.5.3

2009-02-11 Thread Jamis Buck
any:any # PermitLocalCommand no On Feb 11, 2009, at 5:32 PM, Jamis Buck wrote: I suspect that your deploy.rb isn't the whole picture. Have you added anything to the Capfile? Do you have a ~/.caprc file with anything in it? - Jamis On 2/11/09 4:23 PM, Eric Bolden wrote: Jamis Thanks

[Capistrano] Re: capistrano 2.5.4 fails on ssh

2009-02-10 Thread Jamis Buck
One of the things that changed in 2.5.4 was that the User option in .ssh/config was finally honored correctly; there may have been a bug introduced as part of that fix, but authentication works fine for me with 2.5.4. Could you try adding the following option to your deploy.rb:

[Capistrano] Re: Trouble starting a script/runner without waiting for it

2009-02-10 Thread Jamis Buck
Anibal, What is the behavior when you try with nohup? Using nohup is the recommended way to fire off long-running processes with Capistrano: run nohup #{current_path}/script/runner SomeService.run Also, if the invocation itself has any complexity at all, you might be better off

[Capistrano] Re: Changing remote user's password

2009-02-10 Thread Jamis Buck
Here's how I've done that in the past: run passwd, :pty = true do |ch, stream, data| if data =~ /Enter new UNIX password:/ ch.send_data(Capistrano::CLI.password_prompt( New root password: ) + \n) elsif data =~ /Retype new UNIX password:/

[Capistrano] Re: Changing remote user's password

2009-02-10 Thread Jamis Buck
. Is there a way to prompt once and capture, then just send the captured output through the data channel for subsequent requests? Jerod Santo http://jerodsanto.net On Tue, Feb 10, 2009 at 10:43 AM, Jamis Buck ja...@37signals.com mailto:ja...@37signals.com wrote: Here's how I've done

[Capistrano] Re: capistrano 2.5.4 fails on ssh [SOLVED]

2009-02-10 Thread Jamis Buck
Weird... I have no idea why 2.5.4 isn't trying publickey by default for you. Capistrano should always be trying publickey first, then password. There's something fishy there... I know publickey is picked up by default in cap 2.5.4, because it's what I use, and I haven't had any trouble with it.

[Capistrano] Re: Using Capistrano to deploy server patchsets

2009-02-07 Thread Jamis Buck
On Fri, Feb 6, 2009 at 10:00 PM, Mathieu Jobin somek...@gmail.com wrote: no server side? Right, the server side is just sshd. Capistrano is simply a tool for executing commands on remote hosts via SSH. It doesn't need any other software on the remote side. well, in this case, the developer

[Capistrano] Re: capistrano gets failed password when accessing git repository server, but when I manually ssh in it works fine????

2009-02-07 Thread Jamis Buck
ssh connection (server B to server C[repo]) is not really capistrano but git. :) Thanks again Greg 2009/2/7 Jamis Buck ja...@37signals.com: Greg, 1. Capistrano opens a new SSH channel for each request. Essentially, this means a new shell instance for each command, and means you cannot

  1   2   3   4   5   6   7   8   9   10   >