# ENV\[ â€˜REQUEST\_URIâ€™ \] = â€œ/demo/indexâ€

**URL:** <https://www.ruby-forum.com/t/env-a-request-uria-a-oe-demo-indexa/195298>\
**Category:** Rails\
**Created:** [September 21, 2010, 12:08pm UTC](https://www.ruby-forum.com/t/env-a-request-uria-a-oe-demo-indexa/195298 "2010-09-21T12:08:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![swengineer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/97f17d/32.png) [@swengineer](https://www.ruby-forum.com/u/swengineer)\
**Post date:** [September 21, 2010, 12:08pm UTC](https://www.ruby-forum.com/t/env-a-request-uria-a-oe-demo-indexa/195298/1 "2010-09-21T12:08:41Z")

</div>

In the “Rails Way” book, the following was written in the console:

ENV[â€˜REQUEST\_URIâ€™] = â€œ/demo/indexâ€

I searched for a place to describe what ENV[â€˜REQUEST\_URIâ€™] means but  
didn’t find.

I know it is clear here. But, I want to know: Is ENV and ‘REQUEST\_URI’]  
predefined? In other words, do they act like methods I just reference  
to?

Thanks.

---

<div class="post-metadata">

**Author:** ![swengineer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/97f17d/32.png) [@swengineer](https://www.ruby-forum.com/u/swengineer)\
**Post date:** [September 21, 2010, 12:41pm UTC](https://www.ruby-forum.com/t/env-a-request-uria-a-oe-demo-indexa/195298/2 "2010-09-21T12:41:37Z")

</div>

On Sep 21, 11:08 am, Abder-Rahman A. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> In the “Rails Way” book, the following was written in the console:
> 
> ENV[‘REQUEST\_URI’] = “/demo/index”
> 
> I searched for a place to describe what ENV[‘REQUEST\_URI’] means but  
> didn’t find.
> 
> I know it is clear here. But, I want to know: Is ENV and ‘REQUEST\_URI’]  
> predefined? In other words, do they act like methods I just reference  
> to?

ENV is the hash of environment variables (it’s not quite a hash if my  
memory is correct). When using CGI web servers tell the application  
about the request by setting a bunch of environment variables.

Fred

---

<div class="post-metadata">

**Author:** ![swengineer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/97f17d/32.png) [@swengineer](https://www.ruby-forum.com/u/swengineer)\
**Post date:** [September 21, 2010, 12:45pm UTC](https://www.ruby-forum.com/t/env-a-request-uria-a-oe-demo-indexa/195298/3 "2010-09-21T12:45:27Z")

</div>

Thanks @Fred.
