# Svn and ruby structure

**URL:** <https://www.ruby-forum.com/t/svn-and-ruby-structure/79281>\
**Category:** Rails\
**Created:** [March 10, 2006, 12:12am UTC](https://www.ruby-forum.com/t/svn-and-ruby-structure/79281 "2006-03-10T00:12:17Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![craigrails](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/c2a13f/32.png) [@craigrails](https://www.ruby-forum.com/u/craigrails)\
**Post date:** [March 10, 2006, 12:12am UTC](https://www.ruby-forum.com/t/svn-and-ruby-structure/79281/1 "2006-03-10T00:12:17Z")

</div>

I just set up svn and did a checkout.

When I set up the repository, I did an import of the entire base  
directory of the rails application which was great because it allowed me  
to do a checkout on to my computer with everything.

Of course, now on my home computer, I’ve got a changed database.yml and  
environment.rb and the log files (because I’ve been running a copy on my  
home system), and I would suspect that I really only want app and public  
directories (though the doc and plugins would be nice to manage with  
svn).

I am not at all familiar with svn. I’ve changed some view code and some  
controller code and I don’t want to ‘commit’ until I’ve protected some  
of the other files.

Is it better to just create separate repositories for app and public  
directories or is there a way to tell svn to exclude config, root level,  
and log folders while keeping the whole enchilada? I ask because as I’m  
reading the [svnbook.red-book.com](http://svnbook.red-book.com) stuff, nothing is jumping out at me.

Craig

---

<div class="post-metadata">

**Author:** ![craigrails](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/c2a13f/32.png) [@craigrails](https://www.ruby-forum.com/u/craigrails)\
**Post date:** [March 10, 2006, 12:24am UTC](https://www.ruby-forum.com/t/svn-and-ruby-structure/79281/2 "2006-03-10T00:24:22Z")

</div>

check in two database.yml files:

config/database.yml.home  
config/database.yml.vps

Then, in each environment, symlink to the correct version.

You’ll also likely want to investigate svn:ignore to prevent  
Subversion from continuously reminding you of the symlink. 🙂

–  
– Tom M.

---

<div class="post-metadata">

**Author:** ![craigrails](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/c2a13f/32.png) [@craigrails](https://www.ruby-forum.com/u/craigrails)\
**Post date:** [March 10, 2006, 12:57am UTC](https://www.ruby-forum.com/t/svn-and-ruby-structure/79281/3 "2006-03-10T00:57:47Z")

</div>

You could also consider creating more database configurations in  
database.yml.  
e.g. development.home, development, test.home, test, etc…

```
 Erik.

```

Tom M. schreef:

---

<div class="post-metadata">

**Author:** ![craigrails](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/c2a13f/32.png) [@craigrails](https://www.ruby-forum.com/u/craigrails)\
**Post date:** [March 10, 2006, 12:30am UTC](https://www.ruby-forum.com/t/svn-and-ruby-structure/79281/4 "2006-03-10T00:30:29Z")

</div>

good - thanks…

I kept looking for ‘lock’ and ‘ignore’ sounds much better.

Thanks - that seems to be what I was looking for.

Craig

---

<div class="post-metadata">

**Author:** ![craigrails](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/c2a13f/32.png) [@craigrails](https://www.ruby-forum.com/u/craigrails)\
**Post date:** [March 10, 2006, 1:03am UTC](https://www.ruby-forum.com/t/svn-and-ruby-structure/79281/5 "2006-03-10T01:03:49Z")

</div>

Come on, Erik, that’s _too easy_. 🙂

This is a far smarter plan than what I suggested.

–  
– Tom M.

---

<div class="post-metadata">

**Author:** ![craigrails](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/c2a13f/32.png) [@craigrails](https://www.ruby-forum.com/u/craigrails)\
**Post date:** [March 10, 2006, 4:32am UTC](https://www.ruby-forum.com/t/svn-and-ruby-structure/79281/6 "2006-03-10T04:32:13Z")

</div>

2006/3/9, Craig W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> Is it better to just create separate repositories for app and public  
> directories or is there a way to tell svn to exclude config, root level,  
> and log folders while keeping the whole enchilada? I ask because as I’m  
> reading the [svnbook.red-book.com](http://svnbook.red-book.com) stuff, nothing is jumping out at me.

This is a single project, hence it should be a single repository.

Your post prompted me to write a large essay on Subversion usage within  
Rails:

[http://blog.teksol.info/articles/2006/03/09/subversion-primer-for-rails-projects](http://blog.teksol.info/articles/2006/03/09/subversion-primer-for-rails-projects)

Since you need help with Subversion, would you read it and tell me  
what you think ?

Thanks !

---

<div class="post-metadata">

**Author:** ![craigrails](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/c2a13f/32.png) [@craigrails](https://www.ruby-forum.com/u/craigrails)\
**Post date:** [March 10, 2006, 4:41am UTC](https://www.ruby-forum.com/t/svn-and-ruby-structure/79281/7 "2006-03-10T04:41:15Z")

</div>

On Thu, 2006-03-09 at 22:29 -0500, Francois B. wrote:

> [http://blog.teksol.info/articles/2006/03/09/subversion-primer-for-rails-projects](http://blog.teksol.info/articles/2006/03/09/subversion-primer-for-rails-projects)
> 
> Since you need help with Subversion, would you read it and tell me  
> what you think ?

* * *

since I live in fame now on your blog…you betcha

this paragraph is in there twice…

* * *

The most common problems Rails developers have with versioning their  
project are the config/database.yml file and log/ folder. Personally, I  
have found that doc/appdoc/ and doc/apidoc/ sometimes gets in the way.  
More on that later.

* * *

where were you 12 hours ago? You actually answered an svn question that  
I have asked another list since I didn’t want to bother this list with  
svn questions.

this looks exactly like what I needed, I may even start over just to  
track your page and get a little cleaner with my structures at the very  
outset.

It is awesome - I can’t give you specific critique until I step through  
it which may be this weekend.

thanks

Craig
