Forum: Ruby on Rails How do I apply patches from Trac?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
6f3f4fcb842db4b755cd8adc8bca67c6?d=identicon&s=25 ms (Guest)
on 2008-11-10 18:08
(Received via mailing list)
Hi,

although I found some posts about applying patches in this group, I
did not come along with this.

I want to apply this patch: http://dev.rubyonrails.org/ticket/10059

How do I apply patches in general? I read something about diff-files,
git, patch, frozen ruby, etc., but I don't understand the procedure. I
would be very pleased, if you could help me.

Thank you alot!
ms
81b61875e41eaa58887543635d556fca?d=identicon&s=25 Frederick Cheung (Guest)
on 2008-11-10 18:22
(Received via mailing list)
On 10 Nov 2008, at 17:07, ms wrote:

> would be very pleased, if you could help me.
>
Well for starters it's probably a good idea to have rails frozen in
your app's vendor/rails.
The patch file is just a diff between the original and the new version
(ie a list of changes to make).
Typically you download the diff file from trac (if there is more than
one attachment you'll just have to figure out whether one of the
supersedes all others)

if you cd to vendor/rails you can then do something like

patch -p0 < path/to/patch.diff

A long time ago i also coded up a quick hack to make this a little
easier. The gem file is at
https://svn1.hosted-projects.com/fcheung/apply_tic...
Once you've got that installed you can just do (having cd'd to the
copy of rails you want to patch)
apply_ticket 10059

and it will do all the above for you (in the case that there are
multiple attachments available it will ask you which one you want).

Someone released some rake tasks that do the same for lighthouse but I
can't remember who/where they are.

Fred
This topic is locked and can not be replied to.