# Details displayed on error page

**URL:** <https://www.ruby-forum.com/t/details-displayed-on-error-page/146132>\
**Category:** Rails\
**Created:** [August 18, 2008, 11:06am UTC](https://www.ruby-forum.com/t/details-displayed-on-error-page/146132 "2008-08-18T11:06:31Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![dhaval\_parikh33](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/bcef8e/32.png) [@dhaval\_parikh33](https://www.ruby-forum.com/u/dhaval_parikh33)\
**Post date:** [August 18, 2008, 11:06am UTC](https://www.ruby-forum.com/t/details-displayed-on-error-page/146132/1 "2008-08-18T11:06:31Z")

</div>

hi all,  
whenever there’s an error, that error page displays all the data i.e.  
params,session vars,cookie,cache etc to the user. can’t we hide those  
details? or is there any other way to handle this? this happens  
irrespective of current running environment, development or production.

-DP

---

<div class="post-metadata">

**Author:** ![dhaval\_parikh33](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/bcef8e/32.png) [@dhaval\_parikh33](https://www.ruby-forum.com/u/dhaval_parikh33)\
**Post date:** [August 18, 2008, 11:50am UTC](https://www.ruby-forum.com/t/details-displayed-on-error-page/146132/2 "2008-08-18T11:50:04Z")

</div>

On 18 Aug 2008, at 10:06, Dhaval P. wrote:

> hi all,  
> whenever there’s an error, that error page displays all the data  
> i.e.  
> params,session vars,cookie,cache etc to the user. can’t we hide those  
> details? or is there any other way to handle this? this happens  
> irrespective of current running environment, development or  
> production.

By default they are hidden in production, unless you’ve chosen  
otherwise. Errors are however always shown if your browser is running  
on the same machine as the app.

Fred

---

<div class="post-metadata">

**Author:** ![dhaval\_parikh33](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/bcef8e/32.png) [@dhaval\_parikh33](https://www.ruby-forum.com/u/dhaval_parikh33)\
**Post date:** [August 18, 2008, 12:40pm UTC](https://www.ruby-forum.com/t/details-displayed-on-error-page/146132/3 "2008-08-18T12:40:45Z")

</div>

thanks fred,

> By default they are hidden in production, unless you’ve chosen  
> otherwise.

as i said in my earlier post, it shows those details even if in  
production mode. in my environment.rb file, i’ve “ENV[‘RAILS\_ENV’] ||=  
‘production’”. is thr any other setting needs to be done?

-DP

---

<div class="post-metadata">

**Author:** ![dhaval\_parikh33](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/bcef8e/32.png) [@dhaval\_parikh33](https://www.ruby-forum.com/u/dhaval_parikh33)\
**Post date:** [August 18, 2008, 1:31pm UTC](https://www.ruby-forum.com/t/details-displayed-on-error-page/146132/4 "2008-08-18T13:31:57Z")

</div>

> Are you looking at the pages from the same machine that is serving  
> them ?

yes, but it happens even if i access those pages from other machines.

> the relevant setting is  
> config.action\_controller.consider\_all\_requests\_local

u mean to put this line in environment.rb file, right?

-DP

---

<div class="post-metadata">

**Author:** ![dhaval\_parikh33](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/bcef8e/32.png) [@dhaval\_parikh33](https://www.ruby-forum.com/u/dhaval_parikh33)\
**Post date:** [August 18, 2008, 12:49pm UTC](https://www.ruby-forum.com/t/details-displayed-on-error-page/146132/5 "2008-08-18T12:49:25Z")

</div>

On 18 Aug 2008, at 11:40, Dhaval P. wrote:

> thanks fred,
> 
> > By default they are hidden in production, unless you’ve chosen  
> > otherwise.
> 
> as i said in my earlier post, it shows those details even if in  
> production mode. in my environment.rb file, i’ve “ENV[‘RAILS\_ENV’] ||=  
> ‘production’”. is thr any other setting needs to be done?

Are you looking at the pages from the same machine that is serving  
them ?

the relevant setting is  
config.action\_controller.consider\_all\_requests\_local

Fred

---

<div class="post-metadata">

**Author:** ![dhaval\_parikh33](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/bcef8e/32.png) [@dhaval\_parikh33](https://www.ruby-forum.com/u/dhaval_parikh33)\
**Post date:** [August 18, 2008, 1:45pm UTC](https://www.ruby-forum.com/t/details-displayed-on-error-page/146132/6 "2008-08-18T13:45:48Z")

</div>

On Mon, Aug 18, 2008 at 7:31 AM, Dhaval P. \<  
removed\_email\_address@domain.invalid\> wrote:

> u mean to put this line in environment.rb file, right?

The conventional setup is to have the line

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

in config/environments/production.rb

and

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

in both config/environments/development.rb and  
config/environments/test.rb

–  
Rick DeNatale

My blog on Ruby  
[http://talklikeaduck.denhaven2.com/](http://talklikeaduck.denhaven2.com/)

---

<div class="post-metadata">

**Author:** ![dhaval\_parikh33](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/bcef8e/32.png) [@dhaval\_parikh33](https://www.ruby-forum.com/u/dhaval_parikh33)\
**Post date:** [August 18, 2008, 2:04pm UTC](https://www.ruby-forum.com/t/details-displayed-on-error-page/146132/7 "2008-08-18T14:04:56Z")

</div>

> The conventional setup is to have the line
> 
> config.action\_controller.consider\_all\_requests\_local = false
> 
> in config/environments/production.rb
> 
> and
> 
> config.action\_controller.consider\_all\_requests\_local = true
> 
> in both config/environments/development.rb and  
> config/environments/test.rb

thanks Rick, but whatever you mentioned is already there in those files.  
still i can see all details on error page. is there any other setting?  
i’ve seen many sites those don’t show such details even if there’s an  
error and i hope they are developed in RoR 🙂

-DP
