Hari Rajagopal wrote:
>
>    Can someone explain how do I install patches.
>

I can’t believe that a straightforward, reasonable question like this 
went unanswered for 2 and a half years. Especially given how little info 
there is about applying or installing patches out there.

Anyway, this is how to install/apply patches once you’ve got the .diff 
file* downloaded. I don’t know how to do it from repositories, I’m a 
newbie too sadly, but hopefully this will be useful to someone.

* note - often patch files are named .dif or .diff, but often they won’t 
have any file extension at all. They usually come double-zipped in 
.tar.gz despite only being one file.

First, unzip the patch file completely, and put it in the root directory 
of your app.

For the next step, you need a bash console – the ones where there is a $ 
before each input line. This is a unix thing, Linux and Macs come with 
them as standard - though I don't know if they have the 'patch' binaries 
as standard, sorry.

If you’re using Windows, install CygWin from cygwin.com. Cygwin doesn’t 
come with the ‘patch’ binaries package as standard – you need to add it 
during the setup process. There’ll be a screen offering you a huge list 
of categories of packages. Hit the ‘View’ button to switch to an 
alphabetical list of all packages to find 'patch'.

Once you’ve got a bash shell with patch installed, open it, navigate to 
your app’s root directory, then do a patch command to apply the patch. 
This will usually look like this:-

$ patch -p0 -i name_of_patch_here

I say ‘usually’ because, to be honest, I don’t know what -p0 or -i do, 
but it works for me. If that doesn’t work as expected, on one site, I 
saw it written this way:-

$ patch -p0 < name_of_patch_here.patch

That should work. I hope this is useful to someone and saves you the 
hours it took me to find it all the hard way...
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to