Topic: Deployment Woes

Despite my blog-reading, forum-diving, and tfm-reading, deployment with Capistrano keeps giving me trouble.

I'm running Fedora Core 4, and the "svn: Mismatched RA version for 'x'" messages are basically part of the routine, despite uninstalling and reinstalling subversion (and associated) packages countless times. svn does work, provided I don't ask it for --help or a handful of other options.

Also, the www.rubyimagegallery.com server is where subversion resides (same machine). However, /svn/repos/ is protected via .htaccess, so I'm wondering if that's throwing a wrench in the gears.

Anybody have some insight? I'm getting a little down from several days of ineffective installs, recompiles, and .conf hacking.

Thanks in advance!

[root@u15246179 ruby]# cap cold_deploy
  * executing task cold_deploy
  * executing task update
** transaction: start
  * executing task update_code
  * querying latest revision...
svn: Mismatched RA version for 'http': found 1.4.3, expected 1.2.3
*** [update_code] transaction: rollback
  * [update_code] rolling back
  * executing "rm -rf /var/www/vhosts/laurenandjulie.com/releases/20070501175301"
    servers: ["www.rubyimagegallery.com"]
Password:
    [www.rubyimagegallery.com] executing command
    command finished
/usr/local/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/scm/subversion.rb:24:in `latest_revision': Could not determine latest revision (RuntimeError)
        from /usr/local/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/configuration.rb:62:in `initialize'
        from /usr/local/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/configuration.rb:89:in `call'
        from /usr/local/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/configuration.rb:89:in `[]'
        from /usr/local/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/configuration.rb:236:in `method_missing'
        from /usr/local/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/scm/subversion.rb:63:in `checkout'
        from /usr/local/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/recipes/standard.rb:80:in `load'
        from /usr/local/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/actor.rb:159:in `instance_eval'
        from /usr/local/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/actor.rb:159:in `update_code'
         ... 13 levels...
        from /usr/local/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/cli.rb:12:in `execute!'
        from /usr/local/lib/ruby/gems/1.8/gems/capistrano-1.4.1/bin/cap:11
        from /usr/local/bin/cap:16:in `load'
        from /usr/local/bin/cap:16

Re: Deployment Woes

It seems like there must be some portion of the old svn that's still installed somewhere.  This must be really frustrating for you.

If you have slocate installed I recommend running updatedb to update it's knowledge of your filesystem and then running:

locate svn | grep -v "\.svn"

that'll find all the places on your system that have 'svn' in the filename (but not any .svn folders).  That might help.

Re: Deployment Woes

Thanks for the response, danger smile

I've managed to root out all the old subversion pieces.
Now it's just this:

[root@u15246179 ruby]# cap deploy
  * executing task deploy
  * executing task update
** transaction: start
  * executing task update_code
  * querying latest revision...
svn: Unrecognized URL scheme for 'http://www.laurenandjulie.com/svn/repos … ulie/trunk'
*** [update_code] transaction: rollback
  * [update_code] rolling back
  * executing "rm -rf /var/www/vhosts/laurenandjulie.com/releases/20070502175807"
    servers: ["www.rubyimagegallery.com"]
Password:
    [www.rubyimagegallery.com] executing command
    command finished
/usr/local/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/scm/subversion.rb:24:in `latest_revision': Could not determine latest revision (RuntimeError)
        from /usr/local/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/configuration.rb:62:in `initialize'
        from /usr/local/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/configuration.rb:89:in `call'
        from /usr/local/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/configuration.rb:89:in `[]'
        from /usr/local/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/configuration.rb:236:in `method_missing'
        from /usr/local/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/scm/subversion.rb:63:in `checkout'
        from /usr/local/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/recipes/standard.rb:80:in `load'
        from /usr/local/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/actor.rb:159:in `instance_eval'
        from /usr/local/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/actor.rb:159:in `update_code'
         ... 13 levels...
        from /usr/local/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/cli.rb:12:in `execute!'
        from /usr/local/lib/ruby/gems/1.8/gems/capistrano-1.4.1/bin/cap:11
        from /usr/local/bin/cap:16:in `load'
        from /usr/local/bin/cap:16

I've coded the path to the repository (and svn) into deploy.rb, and double-checked by accessing same path to repository via http.
The repository path is protected by .htaccess, but it seems strange that that would impact cap deployment, given that it's such a common way to guard repos.

Re: Deployment Woes

After recompiling subversion and making sure neon was available, I've whittled it down to this:

[root@u15246179 ruby]# cap deploy
  * executing task deploy
  * executing task update
** transaction: start
  * executing task update_code
  * querying latest revision...
svn: PROPFIND request failed on '/svn/repos/lauren_and_julie/trunk'
svn: PROPFIND of '/svn/repos/lauren_and_julie/trunk': Could not read status line: connection was closed by server. (http://www.rubyimagegallery.com)
*** [update_code] transaction: rollback
  * [update_code] rolling back
  * executing "rm -rf /var/www/vhosts/laurenandjulie.com/releases/20070503000233"
    servers: ["www.rubyimagegallery.com"]
Password:
    [www.rubyimagegallery.com] executing command
    command finished
/usr/local/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/scm/subversion.rb:24:in `latest_revision': Could not determine latest revision (RuntimeError)
        from /usr/local/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/configuration.rb:62:in `initialize'
        from /usr/local/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/configuration.rb:89:in `call'
        from /usr/local/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/configuration.rb:89:in `[]'
        from /usr/local/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/configuration.rb:236:in `method_missing'
        from /usr/local/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/scm/subversion.rb:63:in `checkout'
        from /usr/local/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/recipes/standard.rb:80:in `load'
        from /usr/local/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/actor.rb:159:in `instance_eval'
        from /usr/local/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/actor.rb:159:in `update_code'
         ... 13 levels...
        from /usr/local/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/cli.rb:12:in `execute!'
        from /usr/local/lib/ruby/gems/1.8/gems/capistrano-1.4.1/bin/cap:11
        from /usr/local/bin/cap:16:in `load'
        from /usr/local/bin/cap:16

And that may very well be the .htaccess protecting the repository directory.... I no longer rule -anything- out.