Forum: Ruby on Rails How do i apply a patch?

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.
Cd8c9864d88bcafc164d8fdb820cc451?d=identicon&s=25 Chris (Guest)
on 2006-03-10 11:47
Hi,
i have a patch to make instiki work with the latest version of ruby :

as_clean_logger_rb-fixed.patch

But i dont know how  to apply it.  Any ideas??

Thanks,
Chris
A52b0e1c5d982f2512a03c5dbfd033d6?d=identicon&s=25 Dick Davies (Guest)
on 2006-03-10 23:54
(Received via mailing list)
On 10/03/06, Chris <evilgeenius@gmail.com> wrote:
> Hi,
> i have a patch to make instiki work with the latest version of ruby :
>
> as_clean_logger_rb-fixed.patch
>
> But i dont know how  to apply it.  Any ideas??

Normally you cd to the right directory
(usually wherever the gem is installed - look at the patchfile, they
normally
contain relative pathnames which should help ) and run

patch < nameofpatchfile

--
Rasputin :: Jack of All Trades - Master of Nuns
http://number9.hellooperator.net/
Cd8c9864d88bcafc164d8fdb820cc451?d=identicon&s=25 Chris (Guest)
on 2006-03-11 17:55
patch is not recognized from the command line in windows
Ff63c03fd68754adbadd2c6314646bef?d=identicon&s=25 Bill Guindon (agorilla)
on 2006-03-11 18:10
(Received via mailing list)
On 3/11/06, Chris <evilgeenius@gmail.com> wrote:
> patch is not recognized from the command line in windows

You can get a windows version of patch here:
http://unxutils.sourceforge.net/

> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>


--
Bill Guindon (aka aGorilla)
The best answer to most questions is "it depends".
3d1d81bac6dcfc2a873915a2f23f8c3e?d=identicon&s=25 Patrick The Hermit (Guest)
on 2006-03-30 21:33
I have to be the dumbest developer ever.

I have downloaded the "patch" utility and am able to use it via the
command line utility.  I downloaded the patch that I want
(datetime_select_ignores_discard_year_fix.diff).  However when run the
following line:
patch < datetime_select_ignores_discard_year_fix.diff

I receive the error:
patching file 'date_helper.rb'
Assertion failed: hunk, file patch.c, line 321
This application has requested the Runtime to terminate it in an unusual
way.

I run this command in the following directory:
C:\dev\ruby\lib\ruby\gems\1.8\gems\actionpack-1.12.0\lib\action_view\helpers

Horrible.....can't even apply a patch...now THAT'S sad.

Thanks people!
F0379e983ab499fac4d972494beab5c0?d=identicon&s=25 Brez! !! (brez)
on 2006-03-31 07:53
Patrick The Hermit wrote:
> I have to be the dumbest developer ever.

haha! and the baldest.. ;)!

patch -R < datetime_select_ignores_discard_year_fix.diff

I ran it using cygwin [on 1.1] and had the same problem.. looks like a
version issue. i.e. you aint the dumbest [but I got a few canidates tho]

Just hack the damn file and makes the changes yourself - look at the
file, the - means take that line out, the + means put that line in..
hopefully it'll be fixed in the next release..

$
3d1d81bac6dcfc2a873915a2f23f8c3e?d=identicon&s=25 Patrick The Hermit (Guest)
on 2006-04-04 18:15
brilliant....absolutely brilliant.
This topic is locked and can not be replied to.