# Errors in production environment

**URL:** <https://www.ruby-forum.com/t/errors-in-production-environment/136849>\
**Category:** Deployment\
**Created:** [May 6, 2008, 8:45pm UTC](https://www.ruby-forum.com/t/errors-in-production-environment/136849 "2008-05-06T20:45:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sdpurtill](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/77aa72/32.png) [@sdpurtill](https://www.ruby-forum.com/u/sdpurtill)\
**Post date:** [May 6, 2008, 8:45pm UTC](https://www.ruby-forum.com/t/errors-in-production-environment/136849/1 "2008-05-06T20:45:29Z")

</div>

Hi all.

I switched to production environment for my rails app.

My production environment is an apache2+mongrel.

All worked fine, but I have a problem: when an error is generated all  
debug infos come out, as like as in development environment occurs.

What can be the problem?

Note that:

- in my mongrel\_cluster yml config file there is the line: environment:  
production
- the app really runs in the production environment, because it reads  
data from production DB
- I tried to set RAILS\_ENV=production in environmet.rb, but it did not  
work
- I also tried to set config.log\_level = :info in environments.rb, but  
it did not work
- inside the rails app the variable RAILS\_ENV is set to production
- if I launch ruby script/server -e production all works fine and I  
don’t see debug info on errors

The strange thing is that it really runs in production environment but  
the error pages have debug info. Besides this does not occur if I launch  
mongrel\_rails from command line but only with mongrel clusters

Thanks to all

---

<div class="post-metadata">

**Author:** ![sdpurtill](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/77aa72/32.png) [@sdpurtill](https://www.ruby-forum.com/u/sdpurtill)\
**Post date:** [May 7, 2008, 6:12pm UTC](https://www.ruby-forum.com/t/errors-in-production-environment/136849/2 "2008-05-07T18:12:30Z")

</div>

The basics first I suppose. Did you restart your mongrels after  
updating  
the environment.rb? Also, are you sure the log level is malfunctioning?  
Maybe you want to set it to another level like :error or :fatal. Maybe  
try  
one of those out first and see if it’s closer to what you are looking  
for.

Raul

----- Original Message -----  
From: “Sam P.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
To: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Sent: Tuesday, May 06, 2008 11:45 AM  
Subject: [Rails-deploy] Errors in production environment
