# Freeze\_gems to upgrade and SVN

**URL:** <https://www.ruby-forum.com/t/freeze-gems-to-upgrade-and-svn/58058>\
**Category:** Rails\
**Created:** [April 18, 2006, 2:27am UTC](https://www.ruby-forum.com/t/freeze-gems-to-upgrade-and-svn/58058 "2006-04-18T02:27:44Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![janovetz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/53a042/32.png) [@janovetz](https://www.ruby-forum.com/u/janovetz)\
**Post date:** [April 18, 2006, 2:27am UTC](https://www.ruby-forum.com/t/freeze-gems-to-upgrade-and-svn/58058/1 "2006-04-18T02:27:44Z")

</div>

Hi all-

I just decided to move from my 1.1.0 to 1.1.2. I had previously frozen  
to 1.1.0 and therefore had all of rails in SVN in my vendor directory.

When I finally got rake freeze\_gems to work, it blasted (rm -rf) my  
vendor/rails directory and put a new one in there. This also blasted  
all my .svn directories.

Is there some convenient way to do a freeze upgrade and play well with  
SVN? Seems the current way requires that I do an SVN remove on all the  
rails stuff, then SVN add the new stuff back in. Is this the current  
practice?

Cheers,  
Jake

---

<div class="post-metadata">

**Author:** ![janovetz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/53a042/32.png) [@janovetz](https://www.ruby-forum.com/u/janovetz)\
**Post date:** [April 18, 2006, 4:08am UTC](https://www.ruby-forum.com/t/freeze-gems-to-upgrade-and-svn/58058/2 "2006-04-18T04:08:35Z")

</div>

Jake J. wrote:

> Hi all-
> 
> I just decided to move from my 1.1.0 to 1.1.2. I had previously frozen  
> to 1.1.0 and therefore had all of rails in SVN in my vendor directory.
> 
> When I finally got rake freeze\_gems to work, it blasted (rm -rf) my  
> vendor/rails directory and put a new one in there. This also blasted  
> all my .svn directories.
> 
> Is there some convenient way to do a freeze upgrade and play well with  
> SVN? Seems the current way requires that I do an SVN remove on all the  
> rails stuff, then SVN add the new stuff back in. Is this the current  
> practice?
> 
> Cheers,  
> Jake

That’s what I did. After I tried it first the other way and ran into  
the complications that come from deleting the .svn directories, I  
managed to get everything sorted out by using svn remove vendor/rails  
and re-adding them again.

If there’s a better way I’d love to hear it 🙂

Jeff C.man

---

<div class="post-metadata">

**Author:** ![janovetz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/53a042/32.png) [@janovetz](https://www.ruby-forum.com/u/janovetz)\
**Post date:** [April 18, 2006, 4:30am UTC](https://www.ruby-forum.com/t/freeze-gems-to-upgrade-and-svn/58058/3 "2006-04-18T04:30:03Z")

</div>

Jeff C.man wrote:

> That’s what I did. After I tried it first the other way and ran into  
> the complications that come from deleting the .svn directories, I  
> managed to get everything sorted out by using svn remove vendor/rails  
> and re-adding them again.
> 
> If there’s a better way I’d love to hear it 🙂
> 
> Jeff C.man

Yes. I’d like to avoid the 3.8 MB commit if I can!

Jake

---

<div class="post-metadata">

**Author:** ![janovetz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/53a042/32.png) [@janovetz](https://www.ruby-forum.com/u/janovetz)\
**Post date:** [April 18, 2006, 6:16am UTC](https://www.ruby-forum.com/t/freeze-gems-to-upgrade-and-svn/58058/4 "2006-04-18T06:16:18Z")

</div>

Shane S. wrote:

> There’s really no reason why you should have all of rails in your svn  
> repository. You should set it up as an external. You’re not changing  
> rails  
> code, so it shouldnt be under your source control…

Yeah, I’m doing this now. When I initially looked at the external  
command suggested, it seemed that it would force all of ‘vendor’ to be  
from the rails site (and therefore not allow other vendor packages).  
But this wasn’t the case upon further investigation…

Jake

---

<div class="post-metadata">

**Author:** ![janovetz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/53a042/32.png) [@janovetz](https://www.ruby-forum.com/u/janovetz)\
**Post date:** [April 18, 2006, 8:25am UTC](https://www.ruby-forum.com/t/freeze-gems-to-upgrade-and-svn/58058/5 "2006-04-18T08:25:11Z")

</div>

Shane S. wrote:

> There’s really no reason why you should have all of rails in your svn  
> repository. You should set it up as an external. You’re not changing  
> rails  
> code, so it shouldnt be under your source control…

I’m using Capistrano to deploy my app, shouldn’t my vendor directory be  
under version control if I want Capistrano to deploy it?

Jeff C.man

---

<div class="post-metadata">

**Author:** ![janovetz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/53a042/32.png) [@janovetz](https://www.ruby-forum.com/u/janovetz)\
**Post date:** [April 18, 2006, 5:45am UTC](https://www.ruby-forum.com/t/freeze-gems-to-upgrade-and-svn/58058/6 "2006-04-18T05:45:50Z")

</div>

There’s really no reason why you should have all of rails in your svn  
repository. You should set it up as an external. You’re not changing  
rails  
code, so it shouldnt be under your source control…

---

<div class="post-metadata">

**Author:** ![janovetz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/53a042/32.png) [@janovetz](https://www.ruby-forum.com/u/janovetz)\
**Post date:** [April 18, 2006, 8:55am UTC](https://www.ruby-forum.com/t/freeze-gems-to-upgrade-and-svn/58058/7 "2006-04-18T08:55:51Z")

</div>

Jeff C.man wrote:

> Shane S. wrote:
> 
> > There’s really no reason why you should have all of rails in your svn  
> > repository. You should set it up as an external. You’re not changing  
> > rails  
> > code, so it shouldnt be under your source control…
> 
> I’m using Capistrano to deploy my app, shouldn’t my vendor directory be  
> under version control if I want Capistrano to deploy it?

google svn:external

This is a mechanism for pulling code from an external repository.

To be concrete, in your vendor dir, you do something like

svn propset svn:external  
[http://dev.rubyonrails.org/svn/rails/branches/stable](http://dev.rubyonrails.org/svn/rails/branches/stable) rails

Then every time you do an svn up the external svn repository will be  
used for the rails directory and sub-directories.

Rails source is not in your local svn repository. The rest of the  
content of your vendor dir can be done the same way, or you can check it  
into your local repository, depending on your needs.

–

Ray

---

<div class="post-metadata">

**Author:** ![janovetz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/53a042/32.png) [@janovetz](https://www.ruby-forum.com/u/janovetz)\
**Post date:** [April 18, 2006, 9:35am UTC](https://www.ruby-forum.com/t/freeze-gems-to-upgrade-and-svn/58058/8 "2006-04-18T09:35:29Z")

</div>

Ray B. wrote:

> Jeff C.man wrote:
> 
> > Shane S. wrote:
> > 
> > > There’s really no reason why you should have all of rails in your svn  
> > > repository. You should set it up as an external. You’re not changing  
> > > rails  
> > > code, so it shouldnt be under your source control…
> > 
> > I’m using Capistrano to deploy my app, shouldn’t my vendor directory be  
> > under version control if I want Capistrano to deploy it?
> 
> google svn:external
> 
> This is a mechanism for pulling code from an external repository.
> 
> To be concrete, in your vendor dir, you do something like
> 
> svn propset svn:external  
> [http://dev.rubyonrails.org/svn/rails/branches/stable](http://dev.rubyonrails.org/svn/rails/branches/stable) rails
> 
> Then every time you do an svn up the external svn repository will be  
> used for the rails directory and sub-directories.
> 
> Rails source is not in your local svn repository. The rest of the  
> content of your vendor dir can be done the same way, or you can check it  
> into your local repository, depending on your needs.
> 
> –
> 
> Ray

Nice! Thanks, Ray. I’m learning SVN as I go, and I hadn’t looked at  
svn:external at all. I’ll check it out.

Jeff C.man
