# Auto\_complete not working with ruby 1.9

**URL:** <https://www.ruby-forum.com/t/auto-complete-not-working-with-ruby-1-9/176926>\
**Category:** Rails\
**Created:** [October 8, 2009, 2:00pm UTC](https://www.ruby-forum.com/t/auto-complete-not-working-with-ruby-1-9/176926 "2009-10-08T14:00:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![inertia](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/d07c76/32.png) [@inertia](https://www.ruby-forum.com/u/inertia)\
**Post date:** [October 8, 2009, 2:00pm UTC](https://www.ruby-forum.com/t/auto-complete-not-working-with-ruby-1-9/176926/1 "2009-10-08T14:00:43Z")

</div>

Hi,

```
I have a rails app that I'm trying to get all up to date. I've

```

updated rails to 2.3.3 (since I get problems all over the place with  
ruby1.9 and 2.3.4) and updated ruby to 1.9.

```
When I start webrick and look at the app, it works fine, except for

```

the auto\_complete fields, of which I have three, which don’t display the  
list of possible results. If I move back to ruby 1.8 and restart  
webrick, the auto\_complete fields work. Is there something I need to  
change?

Regards

Anthony

---

<div class="post-metadata">

**Author:** ![inertia](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/d07c76/32.png) [@inertia](https://www.ruby-forum.com/u/inertia)\
**Post date:** [October 8, 2009, 2:15pm UTC](https://www.ruby-forum.com/t/auto-complete-not-working-with-ruby-1-9/176926/2 "2009-10-08T14:15:34Z")

</div>

Hi

if you r using ruby 1.9 then you have to apply below patch in  
/lib/autocomeplete\_macro\_helper.rb file

In auto\_complete\_result(entries, field, phrase = nil) method

change content\_tag(“ul”, items.uniq) to content\_tag(“ul”,  
items.uniq.join)

I hope this help you. Let me know if problem is still there…

---

<div class="post-metadata">

**Author:** ![inertia](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/d07c76/32.png) [@inertia](https://www.ruby-forum.com/u/inertia)\
**Post date:** [October 8, 2009, 2:32pm UTC](https://www.ruby-forum.com/t/auto-complete-not-working-with-ruby-1-9/176926/3 "2009-10-08T14:32:55Z")

</div>

Brijesh S. wrote:

> I hope this help you. Let me know if problem is still there…

Hi Brijesh.

```
That does indeed work like a charm. Thank you very much.

```

Anthony
