# 500 error in production environment which I don't get in development env

**URL:** <https://www.ruby-forum.com/t/500-error-in-production-environment-which-i-dont-get-in-development-env/183292>\
**Category:** Rails\
**Created:** [February 11, 2010, 8:22am UTC](https://www.ruby-forum.com/t/500-error-in-production-environment-which-i-dont-get-in-development-env/183292 "2010-02-11T08:22:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jens\_MF](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/91b2a8/32.png) [@Jens\_MF](https://www.ruby-forum.com/u/Jens_MF)\
**Post date:** [February 11, 2010, 8:22am UTC](https://www.ruby-forum.com/t/500-error-in-production-environment-which-i-dont-get-in-development-env/183292/1 "2010-02-11T08:22:53Z")

</div>

Hi: I get a strange 500 error in production environment which I don’t  
get in development env:  
“We’re sorry but something went wrong” message. Production log is  
empty. Write permissions seem to be correct. What gets logged in  
production?  
that problem get tracked down? Is there a quick possibilty to enable  
logging in production env?

-Jens

---

<div class="post-metadata">

**Author:** ![Jens\_MF](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/91b2a8/32.png) [@Jens\_MF](https://www.ruby-forum.com/u/Jens_MF)\
**Post date:** [February 11, 2010, 9:01am UTC](https://www.ruby-forum.com/t/500-error-in-production-environment-which-i-dont-get-in-development-env/183292/2 "2010-02-11T09:01:31Z")

</div>

I solved a part of that problem on my own! By starting Webrick i got  
the error details right on the console. What was going wrong?  
“undefined method” method occured. A table column could not be found  
on a model. Even after running migrations.  
The problem was that RAILS\_ENV for some unknown reason was set to  
development mode. According to that the last migration ran in  
development environment. I changed it back with  
RAILS\_ENV=“production”, ran migrations and everything was fine again.

Pending question is why my production log is not getting filled on  
such errors?! File owner is same as environment.rb and permissions are  
ok to write. (I’m running under passenger)

-Jens

---

<div class="post-metadata">

**Author:** ![Jens\_MF](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/91b2a8/32.png) [@Jens\_MF](https://www.ruby-forum.com/u/Jens_MF)\
**Post date:** [February 11, 2010, 1:06pm UTC](https://www.ruby-forum.com/t/500-error-in-production-environment-which-i-dont-get-in-development-env/183292/3 "2010-02-11T13:06:12Z")

</div>

Yes Jens, you can enable logging in production:  
in your environments/production.rb file enable log level to :debug, as  
config.log\_level = :debug //uncomment this line

-Gourav
