Failure on cap deploy:update

26 views
Skip to first unread message

croceldon

unread,
Sep 17, 2008, 2:01:45 PM9/17/08
to Capistrano
Hi, this is my first capistrano experience, so here goes:

Windows XP, trying to deploy to Ubuntu Hardy. Using deprec.

Here's my deploy.rb file:

----------------------------------------------------------
require 'deprec'

set :application, "diary"
set :domain, "192.168.2.10"
set :repository, "https://192.168.2.50/svn/#{application}/"
# set :gems_for_project, %w(dr_nic_magic_models swiftiply) # list of
gems to be installed

# Update these if you're not running everything on one host.
role :app, domain
role :web, domain
role :db, domain, :primary => true
role :scm, domain # used by deprec if you want to install subversion

# If you aren't deploying to /opt/apps/#{application} on the target
# servers (which is the deprec default), you can specify the actual
location
# via the :deploy_to variable:
set :deploy_to, "/u/apps/#{application}"

# If you aren't using Subversion to manage your source code, specify
# your SCM below:
# set :scm, :subversion

set :user, "jfloyd"

namespace :deploy do
task :restart, :roles => :app, :except => { :no_release => true } do
top.deprec.mongrel.restart
end
end
----------------------------------------------------------------

I've gotten as far as running cap deploy:update, but when I do, here's
the last few lines of output:

* executing "sudo -p 'sudo password: ' chgrp -R app_diary /u/apps/
diary/current/tmp /u/apps/diary/shared"
servers: ["192.168.2.10"]
[192.168.2.10] executing command
*** [err :: 192.168.2.10] chgrp: cannot access `/u/apps/diary/shared':
No such file or directory
command finished
*** [deploy:symlink] rolling back
* executing "ls -xt /u/apps/diary/releases"
servers: ["192.168.2.10"]
[192.168.2.10] executing command
command finished
** [deploy:symlink] exception while rolling back: TypeError, can't
convert nil into String
*** [deploy:update_code] rolling back
* executing "rm -rf /u/apps/diary/releases/20080917175751; true"
servers: ["192.168.2.10"]
[192.168.2.10] executing command
command finished
failed: "sh -c \"sudo -p 'sudo password: ' chgrp -R app_diary /u/apps/
diary/current/tmp /u/apps/diary/shared\"" on 192.168.2.10

I've worked through several snags already through research, but I
can't seem to find any info on how to resolve this. Any help's
greatly appreciated.

Thanks!

Mathias Meyer

unread,
Sep 17, 2008, 4:20:03 PM9/17/08
to capis...@googlegroups.com
On 17.09.2008, at 20:01, croceldon wrote:

> Hi, this is my first capistrano experience, so here goes:
>
> Windows XP, trying to deploy to Ubuntu Hardy. Using deprec.
>
> Here's my deploy.rb file:
>

> I've gotten as far as running cap deploy:update, but when I do, here's
> the last few lines of output:
>
> * executing "sudo -p 'sudo password: ' chgrp -R app_diary /u/apps/
> diary/current/tmp /u/apps/diary/shared"
> servers: ["192.168.2.10"]
> [192.168.2.10] executing command
> *** [err :: 192.168.2.10] chgrp: cannot access `/u/apps/diary/shared':
> No such file or directory
> command finished
> *** [deploy:symlink] rolling back
> * executing "ls -xt /u/apps/diary/releases"
> servers: ["192.168.2.10"]
> [192.168.2.10] executing command
> command finished
> ** [deploy:symlink] exception while rolling back: TypeError, can't
> convert nil into String
> *** [deploy:update_code] rolling back
> * executing "rm -rf /u/apps/diary/releases/20080917175751; true"
> servers: ["192.168.2.10"]
> [192.168.2.10] executing command
> command finished
> failed: "sh -c \"sudo -p 'sudo password: ' chgrp -R app_diary /u/apps/
> diary/current/tmp /u/apps/diary/shared\"" on 192.168.2.10
>

Did you make sure that the directory /u/apps/diary and all the
contents in it exists, e.g. by running cap deploy:setup?

That error very likely results from some code within Capistrano that
causes an error on rollback since the required directories don't exist.

Cheers, Mathias
--
http://paperplanes.de
http://twitter.com/roidrage

croceldon

unread,
Sep 17, 2008, 4:24:18 PM9/17/08
to Capistrano
Here's another little piece of info:

If I edit my deploy.rb file like this:

set :deploy_to, "/u/apps/##{application}"

It works! It creates the "/u/apps/#diary/directory", and everything
works like a charm.

Obviously, though, I'd like to get it working without that extra pound
sign.

Jamis Buck

unread,
Sep 17, 2008, 4:29:21 PM9/17/08
to capis...@googlegroups.com
Have you run "cap deploy:setup" yet? It sounds like "/u/apps/diary/
shared" doesn't exist, which is set up automatically by deploy:setup.

- Jamis

> --~--~---------~--~----~------------~-------~--~----~
> To unsubscribe from this group, send email to capistrano-...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/capistrano
> -~----------~----~----~----~------~----~------~--~---
>

croceldon

unread,
Sep 17, 2008, 4:33:07 PM9/17/08
to Capistrano
Well, I feel like an idiot. The deploy:setup fixed it. I could have
sworn that I ran that command. Oh well.

In just a standard setup (nginx,mongrel) what permissions should I be
setting on the /u directory?

Thanks for your help!
Reply all
Reply to author
Forward
0 new messages