Try adding this to your deploy.rb:
default_run_options[:pty] = true
- Jamis
On Oct 17, 2007, at 5:08 PM, Andy Pols wrote:
I've just updgraded from version 1 to version 2.
Everything appears to works well except that "cap deploy:cleanup"
fails with the following error:
[demo.pols.co.uk] e
Thanks for chiming in, Tim, you're dead on. The Capistrano deployment
recipes are intentionally NOT "one size fits all". They've definitely
grown to include a wider variety of deployment preferences than the
1.x series supported, but they are still limited. It's good to
recognize that Capis
Because it is easy. Feel free to change your deployment strategy
accordingly.
- Jamis
On Oct 19, 2007, at 3:53 PM, Mislav Marohnić wrote:
Is there a compelling reason why Capistrano does svn checkouts by
default, not exports?
A checkout takes more time and space, and I don't really see th
The built-in deployment recipes do not support that (and Capistrano,
in general, does not support that syntax, though you could work
around that.) If what you want is a different deployment directory
per role, you'll need to write your own cap recipes, I'm afraid.
- Jamis
On Oct 17, 2007,
When you say it "didn't work", what do you mean? Are you getting an
error?
- Jamis
On Oct 18, 2007, at 8:07 AM, Jon wrote:
I'm running Capistrano 2.1.0 with capistrano-ext 1.2.0 with staging
and production environments.
I tried to redefine task :restart in my config/deploy/staging.rb, both
I think what you want is the rails_env variable:
set :rails_env, "deploy"
The migrate_env variable is for setting additional environment
variables that your migrations might need.
- Jamis
On Oct 18, 2007, at 5:27 PM, Nathan Youngman wrote:
I thought migrate_env would do exactly what I
On Oct 19, 2007, at 4:44 PM, Mislav Marohnić wrote:
On 10/20/07, Jamis Buck <[EMAIL PROTECTED]> wrote:
Because it is easy. Feel free to change your deployment strategy
accordingly.
I know I can change it, I just wondered why not svn export by
default. I fail to see how export is less
On Oct 20, 2007, at 11:19 PM, Ron wrote:
some background info first:
I use capistrano-ext (1.2.0) to set up staging and production
environments. SSH runs on a non-standard port 2000.
I upgraded from 2.0.0 to 2.1.0 today. Sadly, my deployment script is
broken.
First, I can't run capistrano
cap isn't like Rails, with the magic auto-loading. You need to
manually require the base class:
require 'capistrano/recipes/deploy/scm/base'
- Jamis
On Oct 24, 2007, at 9:19 AM, Chuck Remes wrote:
I checked through the list archives I see that capistrano requires
the usage of a "real" SC
neral note, I have a very stable ruby and rubygems
environment on this machine so it's unlikely a problem in my
environment (though that is always possible).
Any other suggestions?
On Oct 24, 2007, at 10:41 AM, Jamis Buck wrote:
cap isn't like Rails, with the magic auto-loading.
Do you have the "zip" utility installed and in your path? Cap just
shells out to zip to do the compression.
- Jamis
On Oct 24, 2007, at 11:03 AM, Jon Rosebaugh wrote:
Resurrecting this thread...
We're using the latest version of cap (2.1.0, iirc) and we have
synchronous_connect set to true
11:33 AM, Hendy Irawan wrote:
Jamis Buck wrote:
cap isn't like Rails, with the magic auto-loading. You need to
manually require the base class:
require 'capistrano/recipes/deploy/scm/base'
- Jamis
On Oct 24, 2007, at 9:19 AM, Chuck Remes wrote:
I checked through the list
hanks, I will. I think the main thing will be to check if the
user has changed for the session, and close it conditionally, or
cache
the open one with the different username. Additionally, it'd have to
cache the password for the different users.
Joe
On Oct 12, 4:16 pm, Jamis Buck <[
Note that cap (by default) queries svn from both the local and remote
hosts, so you'd need that tunnel definition in both places. If you're
using a deployment strategy like :copy, which only queries svn from
the local host, you'd only need the definition locally.
- Jamis
On Oct 24, 2007, a
The migrate task is only called automatically from deploy:cold, and
deploy:migrations. The standard deploy task does not run the
migrations, and should not require the db role to be set. Also, aside
from deploy:migrate, the only other really rails-centric task is
deploy:finalize_update. Thu
There are two ways to do this. The simplest, and the easiest to use
when developing a new SCM module, is to set the :source variable
instead of the :scm variable:
set :source, MyCustomSCM.new(self)
If you look at capistrano/recipes/deploy.rb, you'll see that :source
defaults to loading w
No fixes yet, I'm afraid. I'm still struggling to find time to finish
the rewrite of Net::SFTP, which I'm hopeful will fix the problem. In
the meantime, I really do apologize for this glitch. I know it is a
showstopper for several people. :(
- Jamis
On Oct 24, 2007, at 4:00 PM, wolfmanjm w
A pointer to
a blog or doc that gives some of the basics on how to extend
capistrano would be great.
On Oct 24, 2007, at 4:49 PM, Jamis Buck wrote:
The migrate task is only called automatically from deploy:cold, and
deploy:migrations. The standard deploy task does not run the
migrations,
Capistrano's implementation assumes that, if passwords are being
used, they are the same on all machines. You *might* be able to work
around this if each task works on a unique subset of the servers, and
the password is the same within each subset. Try putting this at the
top of each of tho
The problem is here:
role :app, "myhost.cl/~paula"
role :web, "myhost.cl/~paula"
That's not a valid host name. Try leaving the "/~paula" off, so you
just have "myhost.cl" as the host name.
- Jamis
On Oct 26, 2007, at 1:24 PM, Carlos Nilo wrote:
Hi all, im really new to Capistrano and
Thanks guys!
- Jamis
On Oct 26, 2007, at 10:34 AM, Mislav Marohnić wrote:
On 10/26/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Congratulations must go to Jamis for having not one but (at least)
five of his projects included in the latest release of Mac OSX
Leopard. The ones I know of are
If it's only the first one, why not just do
before "deploy:migrate", :my_custom_task
And then remove it after the first deployment?
- Jamis
On Oct 26, 2007, at 5:50 PM, Thomas Watson wrote:
I would like to run a custom rake task before the very first
migration.
The first migration runs d
be to overwrite deploy:cold
in deploy.rb with my own version containing the custom task just
before the migrate part.
/watson
On Oct 27, 3:53 am, Jamis Buck <[EMAIL PROTECTED]> wrote:
If it's only the first one, why not just do
before "deploy:migrate", :my_custom_task
And
Can you ssh to auranegra.cl from the command-line?
ssh auranegra.cl
- Jamis
On Oct 27, 2007, at 5:44 AM, Carlos Omar Nilo Poyanco wrote:
Hi, and ty for yhe help.
I replaced "myhost.cl/~paula" for just myhost.cl but I get:
connection failed for: 127.0.0.1 (Errno::ECONNREFUSED: Connection
Is subversion installed locally, and in your path? It must be a
command-line subversion client, with the executable named (by
default) "svn".
- Jamis
On Oct 27, 2007, at 8:20 PM, [EMAIL PROTECTED] wrote:
Well, subversion is installed and running on my server, and it is on
my path. I can
How are you invoking cap?
- Jamis
On Oct 27, 2007, at 8:55 PM, InnerSparkMedia wrote:
I just upgraded to Leopard and am trying to deploy my RoR app with cap
but I get this error:
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
1.8/optparse.rb:1443:in `complete': invalid
Ah, and what version of cap? The -A option is gone completely in cap2.
- Jamis
On Oct 28, 2007, at 1:31 PM, Mike Binder wrote:
cap -A /path/to/app deploy
On Oct 27, 11:03 pm, Jamis Buck <[EMAIL PROTECTED]> wrote:
How are you invoking cap?
- Jamis
On Oct 27, 2007, at 8
:09 AM, Mike Binder wrote:
Jamis,
What's the new method of deploying. I cant seem to find it.
I am running Capistrano v2.1.0
On Oct 28, 1:51 pm, Jamis Buck <[EMAIL PROTECTED]> wrote:
Ah, and what version of cap? The -A option is gone completely in
cap2.
- Jamis
On Oct 28, 2007, a
Are you connecting via a gateway? There is an issue with Net::SFTP
when uploading files over a capistrano gateway connection, and I'm
currently rewriting the Net::SSH family of software to compensate.
It's not a trivial task, and is taking much longer than I had hoped,
but I hope to be done
You've got
set :port, 8000
in there. Is your ssh server listening on port 8000? If not, that's
the problem.
- Jamis
On Oct 30, 2007, at 3:11 PM, Justin Williams wrote:
I'm finally getting around to upgrading my recipes to Capistrano 2.
I'm using the Capistrano-ext multistage support.
Try setting the :runner variable. The :spinner_user variable was used
in cap1, but cap2 changed that in favor of the more general :runner.
- Jamis
On Oct 31, 2007, at 3:29 AM, mikel wrote:
OK...
When I do a cold deploy I get:
# sudo -p 'sudo password: ' -u app sh -c 'cd blah'
As the
Since cap 2.0, Capistrano uses :scm_username and :scm_password,
instead of :svn_*. This way all SCM modules can use the same
variables, instead of inventing their own.
- Jamis
On Nov 2, 2007, at 8:50 AM, Scott wrote:
Mario,
I also fixed this by doing a manual svn checkout from the webser
This is the problem:
svn: Unable to open an ra_local session to URL
svn: Unable to open repository 'file:///home/colinfleming/svn/
homepage/trunk'
If you use the default deployment strategy, the repository must be
accessible to both the local and remote hosts (since both hosts query
it
On Nov 2, 2007, at 6:20 PM, Colin Fleming wrote:
Sorry, replying to my own post here, but the odd thing above is that
the error message about not being able to access the repo comes
*before* it tries to connect to the server (i.e., from what I can tell
it's running that on my local machine).
H
What is your repository variable set to? Does it point at /trunk?
- Jamis
On Nov 2, 2007, at 6:54 PM, Colin Fleming wrote:
Ok, the file:// URL I have there is actually for the server (the
remote host). I've managed to get around that by using http, this
previously didn't work because it requi
Could you please report this as a bug on the Rails trac, for Capistrano?
http://dev.rubyonrails.org
I'll make sure the spawner is only reaped if the spawner pid file is
present.
- Jamis
On Nov 5, 2007, at 11:49 AM, Tobi Reif wrote:
Hi
When I do cap deploy:start I get tmp/pids/dispatch
You can do:
set :revision, "1234"
Or, via the command-line:
cap -S revision=1234 deploy
- Jamis
On Nov 5, 2007, at 8:31 PM, Matthew Crist wrote:
My web host uses a very old version of Subversion. This is causing me
to get "`query_revision': tried to run `svn info svn+ssh://
respository
Yeah, that doesn't work. But if you work up a patch, I'd consider it.
- Jamis
On Nov 7, 2007, at 3:37 AM, Tobi Reif wrote:
Hi
This doesn't seem to work:
namespace :deploy do
after :update_code, :fix_script_perms
task :fix_script_perms do
# ...
end
end
But this work
sudo "run something", :as => "joe"
- Jamis
On Nov 8, 2007, at 12:20 PM, rsimmons wrote:
Are you able to use the -u option for sudo? What is the command
structure to sudo as another user if it is available?
--~--~-~--~~~---~--~~
To unsubscribe from this gro
007, at 5:05 AM, rsimmons wrote:
Does it use the password that you logged in with or do you supply the
password? I saw the -p attribute, but have not been able to get it to
work. How do you format the call with the password?
On Nov 8, 2:44 pm, Jamis Buck <[EMAIL PROTECTED]> wrote:
sudo
I've considered adding a nohup helper, but haven't gotten around to
it. If anyone has the time and inclination, a patch (submitted to
dev.rubyonrails.org) would be great.
- Jamis
On Nov 9, 2007, at 11:39 AM, Tobi Reif wrote:
P.S.
Solved. Changin "sh" to "nohup" helped. Seems to have been
Alas, that tutorial is for cap 1.x. You're going to have to adapt it
to 2.x as you go. You might take a look at http://www.capify.org for
more resources (though the documentation is admittedly very slim
right now, and I apologize for that).
- Jamis
On Nov 9, 2007, at 1:20 PM, [EMAIL PROTEC
I probably just don't understand...but if you don't want your app
disabled, just don't run web:disable. Could you describe your
situation a bit more, so I can understand why web:disable has to be run?
- Jamis
On Nov 10, 2007, at 6:12 AM, gauda wrote:
hello,
sometimes you have to disable,
!
Jamis Buck wrote:
I probably just don't understand...but if you don't want your app
disabled, just don't run web:disable. Could you describe your
situation a bit more, so I can understand why web:disable has to
be run?
- Jamis
On Nov 10, 2007, at 6:12 AM, gauda wrote:
hello
What does your :repository setting look like?
- Jamis
On Nov 12, 2007, at 2:42 PM, John Joseph Bachir wrote:
After upgrading to cap 2.1 from 1.x and generating the appropriate
meta Cap script, a deploy results in this message:
/opt/local/lib/ruby/gems/1.8/gems/capistrano-2.1.0/lib/capistrano
is I used this all the time in cap1 and never had
this
problem before!
On Sep 26, 2:28 am, Jamis Buck <[EMAIL PROTECTED]> wrote:
Yucky. You're being bit by the infamous hanging-put bug. Are you
using a gateway? If so, that's the problem, and there's not really a
wor
Rake integration was deprecated back in the 1.x series, and was
removed altogether with cap2. You should be using cap directly,
rather than via rake, e.g.:
cap deploy:cold
You can see all available cap tasks with "cap -T".
- Jamis
On Nov 13, 2007, at 2:38 PM, sw0rdfish wrote:
Hopefull
istrano/
configuration/loading.rb:86:in `load'
... 10 levels...
from /Library/Ruby/Gems/1.8/gems/capistrano-2.1.0/lib/capistrano/cli/
execute.rb:14:in `execute'
from /Library/Ruby/Gems/1.8/gems/capistrano-2.1.0/bin/cap:4
from /usr/bin/cap:16:in `load'
What's the remote host OS? Looks like there is no such command
"which", which capistrano's deploy:check uses to determine whether a
given command is installed.
- Jamis
On Nov 13, 2007, at 5:02 PM, Josef wrote:
I am trying to run "cap -q deploy:check" from my local machine and I
run in to
Capistrano's documentation sucks.
I fully acknowledge that. And I assume all the blame for it, too. I
want to do something about it, but I've been far, far (far!) too
swamped for the last six months to do more than acknowledge the need.
So, I'm pleading for your help. Here's what I'd like t
In cases like this, I'd recommend bypassing Capistrano's built-in
deployment stuff altogether, and writing your own recipes. Instead of
"deploy.update_code", just do a call to run() with the command(s) you
need to move your project(s) to the servers.
- Jamis
On Nov 15, 2007, at 12:51 AM, N
expected
result ""
Note the # that is being injected
into
the svn invocation.
On Nov 12, 2007 4:45 PM, Jamis Buck <[EMAIL PROTECTED]> wrote:
What does your :repository setting look like?
It is the correct URL to my repository, with no revision specified.
John
--
John Joseph Bachir
Capistrano doesn't invoke ssh-askpass anywhere. The error in question
appears to be coming from the remote-host, but beyond that, I have no
clue. It's going to be something to do with the configuration of the
remote server, though.
- Jamis
On Nov 12, 2007, at 2:03 PM, Scott wrote:
After
r/lib | grep -i xml"
end
Thanks for any help you can send my way.
On Nov 15, 10:04 am, Tobi Reif <[EMAIL PROTECTED]> wrote:
On Thu 2007-11-15 TB wrote:
I have read the FAQ where Jamis Buck says you can perform non-rails
tasks by simply using a "capfile."
If I just wan
I'm pretty biased against wiki's, myself. The key to their success is
having a team of maintainers that are willing to spend a good deal of
their spare time just moderating. Wiki's are spam targets at the best
of times.
That said, if the team that gets chosen to develop the documentation
Capistrano displays all output from the command. It might be that
webistrano is masking some of the output? I don't know. :(
- Jamis
On Nov 17, 2007, at 6:58 PM, jfrankov wrote:
I'm using Webistrano, a web-based wrapper for Capistrano. When I do
the cap deploy, I often get an error on the r
Well, deploy:setup doesn't use sudo, and doesn't look at
the :use_sudo variable. (As an aside, the default_run_options
variable is new in cap 2.1, but doesn't have any bearing on whether
sudo is used or not.)
I'm still on the fence as to whether deploy:setup ought to use sudo.
The workarou
cap2 uses scm_username and scm_password, rather than the svn_*
options that cap1 used.
- Jamis
On Nov 22, 2007, at 3:55 PM, VPC wrote:
Hi.
I'm using next options, and I found that capistrano doesn't asks me
for the svn password, so it can't log into the svn account and
download the updates
Sorry to keep this up in the air for so long, but things have
been...hectic...this week. So, I'll select and announce the
documentation coordinator next week, I promise.
I've responded to almost everyone that has expressed interest in
helping out, but there have been a few (especially in th
Rob,
Please submit the patch as an attachment to a ticket at
dev.rubyonrails.org, for the "Capistrano" component. I've been so
incredibly busy these last two months that I'll only remember to look
at a proposed patch if it has been recorded on trac somewhere. :(
Thanks for your work on th
Try overriding the :real_revision variable so that it looks something
like this:
set(:real_revision) { source.query_revision { |cmd| capture(cmd) } }
- Jamis
On Nov 24, 2007, at 7:07 AM, viktor wrote:
Hi,
I have configuration in which app, db and web servers are placed
inside corporate
If you are using the deploy:cold task, if expects to run migrations
and thus needs a db role. What you want is to not define a db role at
all, and then run parts of the deploy:cold task that you want,
manually, e.g.:
cap deploy:update deploy:start
You could, of course, override the deplo
I’m very pleased to announce that Tyler Bird (http://
www.filmprog.com) has been selected to coordinate the documentation
for Capistrano. I appreciate (very much!) all of you that volunteered
for this.
Tyler has got his work cut out for him, here, but he’s eager to
tackle the job, and I lo
Since a capfile is just a ruby script, you can use any of your usual
Ruby methods for executing processes, e.g. system() or backticks
(`blah`).
- Jamis
On Dec 1, 2007, at 7:50 AM, Tim Finley wrote:
I'm also interested doing local filesystem manipulation, any ideas?
On Dec 1, 3:12 am, Chr
On Dec 5, 2007, at 11:25 AM, DeRailed wrote:
Hi Jamis,
Thanks for the info. I am pushing some mission critical files over
to these servers. Can you think of a sturdier solution in the
interim ?
Regards,
Fernand
On Dec 5, 10:54 am, Jamis Buck <[EMAIL PROTECTED]> wrote:
Fernand,
I get t
Fernand,
I get this periodically, too, and have not had a chance to
investigate. It is definitely related to the order in which services
are loaded by Needle, so it will become a non-issue when I finally
complete the rewrite of Net::SSH and friends. (Wish I could commit to
a date when tha
Please do patch that up. I'd love to have things work cross-platform.
- Jamis
On Dec 11, 2007, at 9:44 AM, Gregory Seidman wrote:
I am deploying from a Perforce repository using
set :deploy_via, :copy
This works great from my Mac, but the other developers around are on
Windows. They are hav
A naive expect-like routine can be written for cap using the callback
that run expects to check for the output and respond with what you
want to say. Note that the block is run once for _each server_, so if
you put an interactive prompt in there, you'll want to make sure that
you cache the
Note that the reason you're getting the prompt up-front is because
the :hosts key is evaluated at the time that the file is parsed. You
can set the :hosts key to a Proc to force that evaluation to be
deferred until the first time the task is actually executed:
set(:custom_username) { Capi
It will be done!
- Jamis
P.S. But not tonight. I'll probably spend a few hours sometime in the
next week or two and do a ticket-processing marathon. Might have a new
cap out before the end of the year...but I won't make any guarantees!
On Dec 15, 2007, at 5:57 PM, Glenn Rempe wrote:
PS
You need to have subversion installed locally--a command-line version
of it, not a GUI one. If it is installed, it must also be in the PATH.
This was true with the previous version of cap as well, though, so I'm
not sure how upgrading could have broken that particular thing.
- Jamis
On Dec
Bill,
Can you post the specific error you're getting? Is it the ssh
connection from capistrano that is complaining, or the ssh connection
for subversion? (I assume you're using subversion.)
- Jamis
On Dec 18, 2007, at 4:08 PM, Bill Kocik wrote:
Check, check, and check. I wish it were so
If all you want to do is push the code to that role, I'd suggest using
deploy:update, instead of a full deploy. The ROLES=import setting on
the command-line does not mean "only run tasks associated with this
role", it means "use this role for all tasks". It's not really very
useful for depl
works exactly as it did above - it tries to connect
to the SVN host as 'bkocik'.
I'm sure I'm doing something dumb somewhere, but I'll be darned if I
can figure out what it is.
-Bill
On Dec 18, 6:36 pm, Jamis Buck <[EMAIL PROTECTED]> wrote:
Bill,
Can you post the
Joe,
Thanks for tracking that down. Any chance I could persuade you to post
that patch to trac, http://dev.rubyonrails.com, so that it won't get
lost in the shuffle? Thanks!
- Jamis
On Dec 19, 2007, at 6:11 AM, Joe Van Dyk wrote:
Hi,
Doing a cap deploy:pending seems to show me all the
On Dec 19, 2007, at 9:07 AM, [EMAIL PROTECTED] wrote:
On Dec 19, 4:00 pm, Jamis Buck <[EMAIL PROTECTED]> wrote:
If all you want to do is push the code to that role, I'd suggest
using
deploy:update, instead of a full deploy. The ROLES=import setting on
the command-line does not mea
it
would finally go through. Maybe that will help someone debug. I
didn't
spend enough time to figure out exactly what the threshold is,
because
the :synchronous_connect option worked for me, but the full file I
was
trying to send was only 196k, so it's a low threshold what ever it
is.
Yes, you can do:
task :foo, :roles => %w(whatever), :on_error => :continue do
run "something that might fail"
end
The :on_error => :continue bit tells capistrano to continue on to the
next task, even if the command fails for any of the servers.
As for running commands on N hosts at a time,
Mark,
This sounds like a "this might possibly bite someone someday" issue.
Have you actually been bitten by this, where a deployment goes bad
because of an incorrect timestamp?
The sad fact is, the only authoritative way to build the timestamp
would be to query a time server on each deplo
Capistrano isn't responsible for setting executable bits on your
files. If you're using subversion, you can make sure the files are
marked as executable in your repository, and then they'll be made
executable automatically on check-out. Google for the svn:executable
property to see how that
If you want cap to detect and prompt for the password, use the sudo
helper directly, instead of run "sudo", e.g.:
sudo "chown -R apache:apache #{latest_release}"
- Jamis
On Jan 2, 2008, at 1:40 PM, halbertn wrote:
Hello,
I'm at my wits end here...
I'm using capistrano 2.1.
I'm overwritin
I'm not ashamed to reveal my ignorance and state that I have never
heard of two-factor auth...so it isn't surprising that Net::SSH would
not handle that, since I wrote that, too. I based Net::SSH off of the
base ssh RFC's, which I don't recall mentioning two-factor
authentication.
- Jamis
ions[:verbose] to :debug - I
didn't do it in my original post because I'll have to make sure it's
all "sanitized".
Thanks for the quick response ... WkH
On Jan 2, 2:44 pm, Jamis Buck <[EMAIL PROTECTED]> wrote:
I'm not ashamed to reveal my ignorance and state t
Not currently, no. Interesting idea, though. If someone were to write
up a patch for that, I'd consider it.
- Jamis
On Jan 2, 2008, at 2:21 PM, Chris Dean wrote:
Is there a way to use different gateways for different hosts? We have
multiple datacenters, each with their own gateway.
If I
On Jan 4, 2008, at 9:36 AM, John M Lauck wrote:
I've been looking into a multi-stage deployment setup and found
several links to http://weblog.jamisbuck.org/2007/7/23/capistrano-multistage
.
Is this still necessary/preferred with Cap 2?
Yes, and in fact, capistrano-multistage will only work
It is a per-task setting:
task :foo, :on_error => :continue do
# ...
end
With :on_error set to :continue, when a run command fails the process
will not abort--the next task in the chain will be invoked.
- Jamis
On Jan 4, 2008, at 5:16 PM, Andy Koch wrote:
Hi,
I thought I once sa
anks,
Jeff
On Jan 2, 4:47 pm, Jamis Buck <[EMAIL PROTECTED]> wrote:
Yeah, currently Net::SSH only does either/or, but not both. If you
could send me the debug output, I'll take a look. No guarantees I'll
have time to implement it, but then again, I'm currently working on
e to detect the failure?
Obviously, if a run "something" fails it may be desirable to have some
fail-safe code run.
Like an exception block...
Regards,
Andy
Jamis Buck wrote:
It is a per-task setting:
task :foo, :on_error => :continue do
# ...
end
With :on_error set to :continue,
That looks more like the shell saying it can't find the "cap" command.
It's definitely not a message generated by Capistrano itself.
- Jamis
On Jan 8, 2008, at 8:26 AM, goodieboy wrote:
Hi,
I have capistrano setup working on one machine, and an identical copy
working on another. One of the
That, unfortunately, is a warning from Ruby itself, and not from
capistrano specifically. Your best bet, if possible, is to chmod the /
opt/nsm directory so that it isn't world-writable. I *think* more
recent Ruby versions are smarter about that warning, too, so if you
aren't running a recen
Each invocation of run() or sudo() is done in a brand new SSH channel.
Running commands via capistrano is not at all like executing commands
in a shell like bash--environment settings do not stick from one
command to the next. If you have setup that you want done on each
run(), you will nee
27;);run('y')}
I have yer x && y
=> nil
run 'x'
I have yer x
=> nil
run 'y'
I have yer y
=> nil
Which works fine on the console. Unfortunately, when I stick the
at_once definition at the top of my deploy.rb script, it runs into all
kinds of
David,
Perhaps I'm not understanding what you're mean, but the current
version of Capistrano allows you to do things like this:
task :foo, :roles => defer { something_that_computes_roles } do
end
The "defer" method is just an alias for lambda that Capistrano adds.
The block there just
You can use the HOSTS environment variable:
cap HOSTS=app1 deploy
- Jamis
On Jan 14, 2008, at 4:19 PM, jvulling wrote:
Hi,
As a new kid to Capistrano I've been looking around for a way to
execute tasks on one server at a time. It's the same problem that
other people are discussing, wantin
My apologies for not getting back to you sooner. What I meant was to
use the ssh command-line itself, directly, to set up the tunnel. Then,
once the tunnel is in place, you'd define the role in Capistrano like
this (the example here assumes you set up the tunnel on port 12345 of
the localho
be :web, :files, etc), but that I don't
necessarily know which servers it will use.
On 1/11/08, Jamis Buck <[EMAIL PROTECTED]> wrote: David,
Perhaps I'm not understanding what you're mean, but the current
version of Capistrano allows you to do things like this:
task :fo
For large migrations that move a lot of data, sometimes you'll see
performance improve if they run on the same box as the DB. Still, if
it doesn't suit you, then just put one of your app servers in your :db
role. Servers can exist in more than one role, and whichever server is
in the :db ro
The File.open() call is happening on your _local_ machine, not the
remote one. There are two ways to approach the problem:
1. Do the edit locally, and then upload the altered version to your
server(s).
task :force_production do
new_file = File.read("config/environment.rb").sub(/# ENV/
You probably will need to use nohup to run the spawner.
- Jamis
On Jan 17, 2008, at 10:20 AM, theduz wrote:
Hi,
I have about eight active RoR sites right now. Of the eight, six are
on Rails 1.1.6 and they deploy correctly every time. Two are on Rails
1.2.3, and those two do not deploy corr
The "put" command can't be done via sudo, because it uses SFTP (which
isn't a command you execute via a shell--it's a protocol run on top of
SSH). All SFTP operations are done as the same user that you are
logging into your servers as. Thus, if you want to be able to write to
a directory, y
801 - 900 of 1553 matches
Mail list logo