Subversion Capistrano Deployment

Hi everyone, I’m new to ruby and web development in general, and i’m
having
issues with deployment from subversion to my test server and production
server.

After adding files on my local copy, and committing them to the
subversion
repository, I run the following command:

rake remote:deploy_dev

this is supposed to push the latest revision of the website up to the
development server, but what i’m finding is that some added files and
folders simply aren’t being added, and other files that were deleted
remain
on the server…also the database migrations aren’t being applied…

I believe i’m adding and removing the files correctly, and if i do a
fresh
checkout from subversion I get every file I previously added. Here is
the
error i get:

“svn: Failed to add directory ‘/home/…/development/doc/app’ : object
of
the same name already exists
command finished
command “svn update /home/…/development” failed on www.mywebsite.com

Any help would be greatly appreciated!

Be sure to “svn up” before deploying, since cap1 uses svn log to
determine the latest revision, and svn log only shows the last
revision as of your last svn up.

Also, note that rake integration is deprecated; I strongly recommend
getting out of the habit of running capistrano via rake. Just use cap
directly (e.g., “cap deploy_dev”, or whatever your task name happens
to be.)

  • Jamis

i’m committing all of my changes to svn, if thats what you mean by “svn
up”
am i understanding you correctly that for example, if i commit to svn
three
times, and then deploy only once after the third commit, then the
changes
from the previous 2 revisions won’t be deployed? If thats the case then
i’d
have to go back and revert everything and run a deploy for every
revision.

I ran cap deploy_dev as you suggested, and i’m still getting this error
that
it’s failing to add the /doc/app directory, because the object of the
same
name already exists, and it’s still not uploading any files that were
added
previously.

I don’t know what it’s trying to add to this folder as non of the
revisions
are in /doc/app

I just want to be able to confidently deploy so the development and
ultimately the production site can look like my local copy…

I appreciate your help

I’m typing “svn up” and “svn log” in the console and i’m getting an
error. I
tried “cap svn up” also and thats saying there’s an undefined method for
‘svn’ in capistrano. I’m using TortoiseSVN as my client, does that
change
anything?

Sorry i’m such a noob at this, i really appreciate your help Jamis :slight_smile:

Right, so when I say “svn up”, I mean: type “svn up” at the console
before deploying. :slight_smile:

E.g.:

  1. Make an edit.
  2. svn commit
  3. Make another edit
  4. svn commit
  5. svn log

Note that the svn log command won’t include your last two commits. You
have to type “svn up” before it sees them. And since cap1 uses “svn
log” to determine the latest revision… yeah. It’s lame, but there
you have it.

  • Jamis

I’m not familiar at all with TortoiseSVN. Make sure you have a
command-line version of subversion installed, and in your path.

  • Jamis

Jamis B. wrote:

Right, so when I say “svn up”, I mean: type “svn up” at the console
before deploying. :slight_smile:

E.g.:

  1. Make an edit.
  2. svn commit
  3. Make another edit
  4. svn commit
  5. svn log

Note that the svn log command won’t include your last two commits. You
have to type “svn up” before it sees them. And since cap1 uses “svn
log” to determine the latest revision… yeah. It’s lame, but there
you have it.

Weird, I never knew that – I guess I’ve been lucky enough not to get
bit.

But I have to ask – wouldn’t it make sense, then, to have svn up as the
first step in any capistrano task that relies on subversion?

–Al Evans

TortoiseSVN is a windows client. Its nice but probably more people
here are familiar with the command line way of things on unix (I.e.
Mac or linux) I would suggest that you get the command line client
and use that so that these directions will make more sense to you.

Brian

Sent from my iPhone

On Jul 1, 2007, at 7:56 PM, “Davin Chitra” [email protected]

cap2 no longer relies on the working copy. All queries for the current
state of the repository are done remotely, against the repository url,
so this is no longer an issue.

I hope to have cap2 final out by the end of the week, at which point I
will begin vigorously encouraging all cap1 users to upgrade. :slight_smile:

  • Jamis

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs