# Tracking changes to env\['PATH\_INFO'\]

**URL:** <https://www.ruby-forum.com/t/tracking-changes-to-env-path-info/182833>\
**Category:** Rails\
**Created:** [February 3, 2010, 3:32pm UTC](https://www.ruby-forum.com/t/tracking-changes-to-env-path-info/182833 "2010-02-03T15:32:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ralphshnelvar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e19adc/32.png) [@ralphshnelvar](https://www.ruby-forum.com/u/ralphshnelvar)\
**Post date:** [February 3, 2010, 3:32pm UTC](https://www.ruby-forum.com/t/tracking-changes-to-env-path-info/182833/1 "2010-02-03T15:32:50Z")

</div>

I am using validates\_captcha … which for reasons I do not understand  
hooks into middleware.

validates\_captcha is getting a bit upset (it dumps the stack and then  
rescues itself) when it sees  
env[‘PATH\_INFO’]  
equal to  
/undefined

Thus _something_ is setting env[‘PATH\_INFO’] to undefined … and I  
would sure like to know what it is.

How can I set things up to see what line of code is doing that?

---

<div class="post-metadata">

**Author:** ![ralphshnelvar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e19adc/32.png) [@ralphshnelvar](https://www.ruby-forum.com/u/ralphshnelvar)\
**Post date:** [February 3, 2010, 5:15pm UTC](https://www.ruby-forum.com/t/tracking-changes-to-env-path-info/182833/2 "2010-02-03T17:15:58Z")

</div>

Ralph S. wrote:

> I am using validates\_captcha … which for reasons I do not understand  
> hooks into middleware.
> 
> validates\_captcha is getting a bit upset (it dumps the stack and then  
> rescues itself) when it sees  
> env[‘PATH\_INFO’]  
> equal to  
> /undefined
> 
> Thus _something_ is setting env[‘PATH\_INFO’] to undefined … and I  
> would sure like to know what it is.
> 
> How can I set things up to see what line of code is doing that?

Have you searched the code to see if there’s an obvious reference to  
that variable?

Have you tried stepping through with the debugger?

Best,  
–Â  
Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid
