# Subversion and Capistrano

**URL:** <https://www.ruby-forum.com/t/subversion-and-capistrano/59179>\
**Category:** Rails\
**Created:** [April 30, 2006, 4:04pm UTC](https://www.ruby-forum.com/t/subversion-and-capistrano/59179 "2006-04-30T16:04:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![al-evans](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/54ee81/32.png) [@al-evans](https://www.ruby-forum.com/u/al-evans)\
**Post date:** [April 30, 2006, 4:04pm UTC](https://www.ruby-forum.com/t/subversion-and-capistrano/59179/1 "2006-04-30T16:04:14Z")

</div>

I have a project under Subversion, deployed by Capistrano.

When it is deployed, obviously I need to deploy “real” copies of  
database.yml, deploy.rb, and maybe a couple of other files.

But if I offer it for public checkout, I obviously do not want these  
files as part of the checked out code.

What’s the best way to handle this?

–Al Evans

---

<div class="post-metadata">

**Author:** ![al-evans](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/54ee81/32.png) [@al-evans](https://www.ruby-forum.com/u/al-evans)\
**Post date:** [April 30, 2006, 7:33pm UTC](https://www.ruby-forum.com/t/subversion-and-capistrano/59179/2 "2006-04-30T19:33:20Z")

</div>

Al Evans wrote:

> I have a project under Subversion, deployed by Capistrano.
> 
> When it is deployed, obviously I need to deploy “real” copies of  
> database.yml, deploy.rb, and maybe a couple of other files.
> 
> But if I offer it for public checkout, I obviously do not want these  
> files as part of the checked out code.
> 
> What’s the best way to handle this?
> 
> –Al Evans

upload your database.yml into shared folder seperately after first  
deployment  
and write a task to create a symbolic link to it during deployment.

[www.sylow.net](http://www.sylow.net)  
Gokhan A.  
Web D.

---

<div class="post-metadata">

**Author:** ![al-evans](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/54ee81/32.png) [@al-evans](https://www.ruby-forum.com/u/al-evans)\
**Post date:** [May 1, 2006, 1:57pm UTC](https://www.ruby-forum.com/t/subversion-and-capistrano/59179/3 "2006-05-01T13:57:40Z")

</div>

Gokhan A. wrote:

> upload your database.yml into shared folder seperately after first  
> deployment  
> and write a task to create a symbolic link to it during deployment.

Thanks! That should work for the database config, anyway. I don’t know  
why I didn’t think of it, I’m already doing that for some other files:-)

–Al Evans

---

<div class="post-metadata">

**Author:** ![al-evans](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/54ee81/32.png) [@al-evans](https://www.ruby-forum.com/u/al-evans)\
**Post date:** [May 3, 2006, 6:56pm UTC](https://www.ruby-forum.com/t/subversion-and-capistrano/59179/4 "2006-05-03T18:56:27Z")

</div>

Hi Al,

You could use a task that uploads database.yml after your code is  
checked out on the server.

desc “Update code outside of svn.”  
task :after\_update\_code do  
put File.read(“config/database.yml”), “#{release\_path}/config/  
database.yml”, :mode =\> 0400  
end

Good luck,  
Bradley Taylor

* * *

Rails Machine  
Simplified web application deployment  
[http://railsmachine.com](http://railsmachine.com)

---

<div class="post-metadata">

**Author:** ![al-evans](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/54ee81/32.png) [@al-evans](https://www.ruby-forum.com/u/al-evans)\
**Post date:** [May 3, 2006, 6:56pm UTC](https://www.ruby-forum.com/t/subversion-and-capistrano/59179/5 "2006-05-03T18:56:34Z")

</div>

On 30 Apr 2006, at 3:04 pm, Al Evans wrote:

> I have a project under Subversion, deployed by Capistrano.
> 
> When it is deployed, obviously I need to deploy “real” copies of  
> database.yml, deploy.rb, and maybe a couple of other files.
> 
> But if I offer it for public checkout, I obviously do not want these  
> files as part of the checked out code.
> 
> What’s the best way to handle this?

No idea whether it’s the best, but one way which works is described  
here:

[http://www.paulhammond.org/2006/03/passwords/](http://www.paulhammond.org/2006/03/passwords/)

Kerry
