# Applying patches to gems

**URL:** <https://www.ruby-forum.com/t/applying-patches-to-gems/81438>\
**Category:** Ruby\
**Created:** [November 30, 2005, 4:13pm UTC](https://www.ruby-forum.com/t/applying-patches-to-gems/81438 "2005-11-30T16:13:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ed.howland](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/ad7895/32.png) [@ed.howland](https://www.ruby-forum.com/u/ed.howland)\
**Post date:** [November 30, 2005, 4:13pm UTC](https://www.ruby-forum.com/t/applying-patches-to-gems/81438/1 "2005-11-30T16:13:50Z")

</div>

Hi, I sent this query over to the Rails list, but no joy there.

In general, how do you apply a patch to an installed gem? Do you have  
to get the gem src and rebuild the gem, then reinstall? Or, since it  
is just ruby code, can you apply it in place in the gem’s library  
folder.

I am specifically talking about the patch Ticket #2245:  
as\_clean\_logger\_rb-fixed.patch.  
which fixes the Rails 0.13/Ruby 1.8.3 Logger problem.

Thanks  
Ed

---

<div class="post-metadata">

**Author:** ![ed.howland](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/ad7895/32.png) [@ed.howland](https://www.ruby-forum.com/u/ed.howland)\
**Post date:** [November 30, 2005, 4:38pm UTC](https://www.ruby-forum.com/t/applying-patches-to-gems/81438/2 "2005-11-30T16:38:21Z")

</div>

Ed Howland wrote:

> Hi, I sent this query over to the Rails list, but no joy there.
> 
> In general, how do you apply a patch to an installed gem? Do you have  
> to get the gem src and rebuild the gem, then reinstall? Or, since it  
> is just ruby code, can you apply it in place in the gem’s library  
> folder.

Why not just fix what’s broken and release a new version?

If this is just for you, then just change the code in the gem’s lib  
folder.

## James

[http://www.ruby-doc.org](http://www.ruby-doc.org) - Ruby Help & Documentation  
[Ruby Code & Style](http://www.artima.com/rubycs/) - Ruby Code & Style: Writers wanted  
[http://www.rubystuff.com](http://www.rubystuff.com) - The Ruby Store for Ruby Stuff  
[http://www.jamesbritt.com](http://www.jamesbritt.com) - Playing with Better Toys  
[http://www.30secondrule.com](http://www.30secondrule.com) - Building Better Tools

---

<div class="post-metadata">

**Author:** ![ed.howland](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/ad7895/32.png) [@ed.howland](https://www.ruby-forum.com/u/ed.howland)\
**Post date:** [November 30, 2005, 6:11pm UTC](https://www.ruby-forum.com/t/applying-patches-to-gems/81438/3 "2005-11-30T18:11:40Z")

</div>

On 11/30/05, Ed Howland [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Or, since it  
> is just ruby code, can you apply it in place in the gem’s library  
> folder.

that’s it.

Dave
