# Subversion Capistrano Deployment

**URL:** <https://www.ruby-forum.com/t/subversion-capistrano-deployment/108290>\
**Category:** Deployment\
**Created:** [July 1, 2007, 7:49pm UTC](https://www.ruby-forum.com/t/subversion-capistrano-deployment/108290 "2007-07-01T19:49:56Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Davin\_Chitra](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/bc79bd/32.png) [@Davin\_Chitra](https://www.ruby-forum.com/u/Davin_Chitra)\
**Post date:** [July 1, 2007, 7:49pm UTC](https://www.ruby-forum.com/t/subversion-capistrano-deployment/108290/1 "2007-07-01T19:49:56Z")

</div>

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](http://www.mywebsite.com)”

Any help would be greatly appreciated!

---

<div class="post-metadata">

**Author:** ![Davin\_Chitra](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/bc79bd/32.png) [@Davin\_Chitra](https://www.ruby-forum.com/u/Davin_Chitra)\
**Post date:** [July 1, 2007, 8:12pm UTC](https://www.ruby-forum.com/t/subversion-capistrano-deployment/108290/2 "2007-07-01T20:12:59Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Davin\_Chitra](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/bc79bd/32.png) [@Davin\_Chitra](https://www.ruby-forum.com/u/Davin_Chitra)\
**Post date:** [July 2, 2007, 3:52am UTC](https://www.ruby-forum.com/t/subversion-capistrano-deployment/108290/3 "2007-07-02T03:52:38Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Davin\_Chitra](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/bc79bd/32.png) [@Davin\_Chitra](https://www.ruby-forum.com/u/Davin_Chitra)\
**Post date:** [July 2, 2007, 4:56am UTC](https://www.ruby-forum.com/t/subversion-capistrano-deployment/108290/4 "2007-07-02T04:56:42Z")

</div>

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 🙂

---

<div class="post-metadata">

**Author:** ![Davin\_Chitra](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/bc79bd/32.png) [@Davin\_Chitra](https://www.ruby-forum.com/u/Davin_Chitra)\
**Post date:** [July 2, 2007, 4:40am UTC](https://www.ruby-forum.com/t/subversion-capistrano-deployment/108290/5 "2007-07-02T04:40:41Z")

</div>

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

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

---

<div class="post-metadata">

**Author:** ![Davin\_Chitra](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/bc79bd/32.png) [@Davin\_Chitra](https://www.ruby-forum.com/u/Davin_Chitra)\
**Post date:** [July 2, 2007, 5:32am UTC](https://www.ruby-forum.com/t/subversion-capistrano-deployment/108290/6 "2007-07-02T05:32:44Z")

</div>

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

- Jamis

---

<div class="post-metadata">

**Author:** ![Davin\_Chitra](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/bc79bd/32.png) [@Davin\_Chitra](https://www.ruby-forum.com/u/Davin_Chitra)\
**Post date:** [July 3, 2007, 12:23am UTC](https://www.ruby-forum.com/t/subversion-capistrano-deployment/108290/7 "2007-07-03T00:23:56Z")

</div>

Jamis B. wrote:

> Right, so when I say “svn up”, I mean: type “svn up” at the console  
> before deploying. 🙂
> 
> 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

---

<div class="post-metadata">

**Author:** ![Davin\_Chitra](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/bc79bd/32.png) [@Davin\_Chitra](https://www.ruby-forum.com/u/Davin_Chitra)\
**Post date:** [July 2, 2007, 9:55am UTC](https://www.ruby-forum.com/t/subversion-capistrano-deployment/108290/8 "2007-07-02T09:55:07Z")

</div>

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” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![Davin\_Chitra](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/bc79bd/32.png) [@Davin\_Chitra](https://www.ruby-forum.com/u/Davin_Chitra)\
**Post date:** [July 3, 2007, 12:40am UTC](https://www.ruby-forum.com/t/subversion-capistrano-deployment/108290/9 "2007-07-03T00:40:29Z")

</div>

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. 🙂

- Jamis
