# How to integrate svn with rails

**URL:** <https://www.ruby-forum.com/t/how-to-integrate-svn-with-rails/172023>\
**Category:** Rails\
**Created:** [July 13, 2009, 2:46pm UTC](https://www.ruby-forum.com/t/how-to-integrate-svn-with-rails/172023 "2009-07-13T14:46:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Xiahong\_G](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/x/3d9bf3/32.png) [@Xiahong\_G](https://www.ruby-forum.com/u/Xiahong_G)\
**Post date:** [July 13, 2009, 2:46pm UTC](https://www.ruby-forum.com/t/how-to-integrate-svn-with-rails/172023/1 "2009-07-13T14:46:00Z")

</div>

Hi everyone,

I am a newbie on rails. I tried to use svn to control my code version.  
However, I found the following problems:

When I typed in “ruby script/generate scaffold product”, the added  
files were not applied in svn. The same problem occurred when I  
deleted some files by typing in “ruby script/destroy”. In this case,  
the removed file were not applied in svn.

How to fix this problem?

thanks in advance,  
xiahong

---

<div class="post-metadata">

**Author:** ![Xiahong\_G](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/x/3d9bf3/32.png) [@Xiahong\_G](https://www.ruby-forum.com/u/Xiahong_G)\
**Post date:** [July 13, 2009, 3:22pm UTC](https://www.ruby-forum.com/t/how-to-integrate-svn-with-rails/172023/2 "2009-07-13T15:22:50Z")

</div>

Files aren’t automatically added or deleted in svn. You have to  
explicitly perform an “svn add filename” or “svn delete filename”.

---

<div class="post-metadata">

**Author:** ![Xiahong\_G](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/x/3d9bf3/32.png) [@Xiahong\_G](https://www.ruby-forum.com/u/Xiahong_G)\
**Post date:** [July 13, 2009, 3:58pm UTC](https://www.ruby-forum.com/t/how-to-integrate-svn-with-rails/172023/3 "2009-07-13T15:58:28Z")

</div>

is there any easy way to do this?  
For example, if i type in “ruby script/destroy model user”, i have to do  
“svn delete filename” for multiple files.

2009/7/13 Terry W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![Xiahong\_G](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/x/3d9bf3/32.png) [@Xiahong\_G](https://www.ruby-forum.com/u/Xiahong_G)\
**Post date:** [July 13, 2009, 5:39pm UTC](https://www.ruby-forum.com/t/how-to-integrate-svn-with-rails/172023/4 "2009-07-13T17:39:06Z")

</div>

gaoxh gaoxh04 wrote:

> is there any easy way to do this?  
> For example, if i type in “ruby script/destroy model user”, i have to do  
> “svn delete filename” for multiple files.

If you had read the help text for script/generate and script/destroy,  
you would know that -c will do what you want.

But please don’t use Subversion. It uses an inefficient centralized  
model of version control. Git takes a little getting used to, but it’s  
more capable and you’ll be a lot happier with it.

## Best,

Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid
