# How do I apply a patch to Rails?

**URL:** <https://www.ruby-forum.com/t/how-do-i-apply-a-patch-to-rails/57509>\
**Category:** Rails\
**Created:** [April 11, 2006, 4:58pm UTC](https://www.ruby-forum.com/t/how-do-i-apply-a-patch-to-rails/57509 "2006-04-11T16:58:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Martin\_Smith](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/278dde/32.png) [@Martin\_Smith](https://www.ruby-forum.com/u/Martin_Smith)\
**Post date:** [April 11, 2006, 4:58pm UTC](https://www.ruby-forum.com/t/how-do-i-apply-a-patch-to-rails/57509/1 "2006-04-11T16:58:49Z")

</div>

Hi,

How do I apply a patch to Rails?

From what I can find it looks like I need to be running on the latest  
version from SVN.

I don’t want to do that however.

I have also tried applying the changes to the .rb file concerned, but  
that didn’t seem to work.

Martin

---

<div class="post-metadata">

**Author:** ![Martin\_Smith](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/278dde/32.png) [@Martin\_Smith](https://www.ruby-forum.com/u/Martin_Smith)\
**Post date:** [April 11, 2006, 7:03pm UTC](https://www.ruby-forum.com/t/how-do-i-apply-a-patch-to-rails/57509/2 "2006-04-11T19:03:54Z")

</div>

You may not have to. I have had some luck with overriding rails bits  
by copying them into config/environment.rb and  
app/helpers/application\_helper.rb and tinkering them there.

I was able to implement text\_field\_with\_index\_auto\_complete and the  
associated auto\_complete\_with\_index\_for without patching anything so I  
could use them for forms with multiple records.

---

<div class="post-metadata">

**Author:** ![Martin\_Smith](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/278dde/32.png) [@Martin\_Smith](https://www.ruby-forum.com/u/Martin_Smith)\
**Post date:** [April 12, 2006, 4:10pm UTC](https://www.ruby-forum.com/t/how-do-i-apply-a-patch-to-rails/57509/3 "2006-04-12T16:10:31Z")

</div>

On Tuesday 11 April 2006 15:58, Martin Smith wrote:

> I have also tried applying the changes to the .rb file concerned, but  
> that didn’t seem to work.
> 
> Martin

You can also run “rake rails:freeze:gems” to get a frozen copy of the  
gem in  
your vendor directory. Note that this was broken in 1.1 and fixed again  
in  
1.1.1. Also, in 1.0 the command is different but I forget what it was

Ashley
