# Weird auto-complete production problem in Rails 2.3.2

**URL:** <https://www.ruby-forum.com/t/weird-auto-complete-production-problem-in-rails-2-3-2/166506>\
**Category:** Rails\
**Created:** [April 26, 2009, 2:43pm UTC](https://www.ruby-forum.com/t/weird-auto-complete-production-problem-in-rails-2-3-2/166506 "2009-04-26T14:43:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![pepe](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/4da419/32.png) [@pepe](https://www.ruby-forum.com/u/pepe)\
**Post date:** [April 26, 2009, 2:43pm UTC](https://www.ruby-forum.com/t/weird-auto-complete-production-problem-in-rails-2-3-2/166506/1 "2009-04-26T14:43:53Z")

</div>

Hello.

ruby 1.8.6 (patchlevel 111)  
rails 2.3.2  
Windows XP Professional

I am getting quite a weird problem. I have several auto-complete  
fields in a page. When I run the code in development mode everything  
works but when the application runs in production mode one and only  
one of the fields does not auto-complete anymore.

The database being used is the same in both cases (I’m just replacing  
‘development:’ and ‘production:’ in database.yml whenever I change  
environments) so a data problem is out of the question.

I have looked and compared code between different auto-complete fields  
and everything is identical except for the field names. Controller  
code does not seem to be a problem either. Checked logs and I can’t  
see anything obviously wrong either. Searched the web but found  
nothing.

Any help would be appreciated.

Thanks a lot.

Pepe

---

<div class="post-metadata">

**Author:** ![pepe](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/4da419/32.png) [@pepe](https://www.ruby-forum.com/u/pepe)\
**Post date:** [April 26, 2009, 3:43pm UTC](https://www.ruby-forum.com/t/weird-auto-complete-production-problem-in-rails-2-3-2/166506/2 "2009-04-26T15:43:00Z")

</div>

Still trying to figure this out. Some more info:

The auto-complete field that does not work depends on the values  
entered in 2 other auto-comple fields. In development the 2 fields are  
being updated correctly but not when the application runs in  
production mode mode.

Those values are stored in session variables and I have read that  
there are changes as how sessions behave with 2.3.2. Any ideas what  
might be going on?

Thanks a lot.

---

<div class="post-metadata">

**Author:** ![pepe](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/4da419/32.png) [@pepe](https://www.ruby-forum.com/u/pepe)\
**Post date:** [April 26, 2009, 3:58pm UTC](https://www.ruby-forum.com/t/weird-auto-complete-production-problem-in-rails-2-3-2/166506/3 "2009-04-26T15:58:50Z")

</div>

Found a hack?

I looked into the environments folder and compared development vs.  
production. I found this line:

config.action\_controller.consider\_all\_requests\_local = false

I changed it to ‘true’ and the application now works. Any kind soul  
that could explain this to me? I’m not really a Rails expert.

Thanks

---

<div class="post-metadata">

**Author:** ![pepe](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/4da419/32.png) [@pepe](https://www.ruby-forum.com/u/pepe)\
**Post date:** [April 27, 2009, 2:26am UTC](https://www.ruby-forum.com/t/weird-auto-complete-production-problem-in-rails-2-3-2/166506/4 "2009-04-27T02:26:56Z")

</div>

Thanks for the explanation, but I was looking more towards of why the  
application works after changing that setting, which should have  
nothing to do about how sessions work, which I believe to be the real  
problem.

I have noticed that when auto-complete fields are used and vaulues  
selected the session variables I store those values in work fine and  
contain data but when I change to production those session variables  
are not being updated.

I am using one controller only, if that means anything.

Thanks.

---

<div class="post-metadata">

**Author:** ![pepe](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/4da419/32.png) [@pepe](https://www.ruby-forum.com/u/pepe)\
**Post date:** [April 27, 2009, 1:19am UTC](https://www.ruby-forum.com/t/weird-auto-complete-production-problem-in-rails-2-3-2/166506/5 "2009-04-27T01:19:50Z")

</div>

pepe wrote:

> Found a hack?
> 
> I looked into the environments folder and compared development vs.  
> production. I found this line:
> 
> config.action\_controller.consider\_all\_requests\_local = false
> 
> I changed it to ‘true’ and the application now works. Any kind soul  
> that could explain this to me? I’m not really a Rails expert.

AWDWR(3rd), p 686 says:

The default setting of true means that all exceptions will display error  
and backtrace information in the browser. Set this to false in  
production to stop users from seeing this information.
