# Application error (Rails)

**URL:** <https://www.ruby-forum.com/t/application-error-rails/81941>\
**Category:** Rails\
**Created:** [March 14, 2006, 11:17pm UTC](https://www.ruby-forum.com/t/application-error-rails/81941 "2006-03-14T23:17:56Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![hreyaatnh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/f17d59/32.png) [@hreyaatnh](https://www.ruby-forum.com/u/hreyaatnh)\
**Post date:** [March 14, 2006, 11:17pm UTC](https://www.ruby-forum.com/t/application-error-rails/81941/1 "2006-03-14T23:17:56Z")

</div>

After I attempted to add ActionMailer functionality, it gave the  
“Application error (Rails)” and now, everything on my site works, except  
for the part where the Actionmailer ‘would have’ sent the email.

I took that out now, re-uploaded the file, and ran “killall -USR1  
dispatch.fcgi” and still nothing. Everything else works, except that.

Any idea what else was affected? Should I just copy my app folder  
overtop of it again? Thanks for any help…I really want to fix this!

---

<div class="post-metadata">

**Author:** ![hreyaatnh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/f17d59/32.png) [@hreyaatnh](https://www.ruby-forum.com/u/hreyaatnh)\
**Post date:** [March 16, 2006, 4:16am UTC](https://www.ruby-forum.com/t/application-error-rails/81941/2 "2006-03-16T04:16:01Z")

</div>

What is your log displaying?

---

<div class="post-metadata">

**Author:** ![hreyaatnh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/f17d59/32.png) [@hreyaatnh](https://www.ruby-forum.com/u/hreyaatnh)\
**Post date:** [March 16, 2006, 3:22pm UTC](https://www.ruby-forum.com/t/application-error-rails/81941/3 "2006-03-16T15:22:30Z")

</div>

Suggestion to core developers: Have an configuration option that you  
can set to allow exception tracebacks to appear in production mode (like  
that which appears in development mode) rather than “Application Error  
(Rails)”.

We would much prefer that a user can report (or take a screen dump) when  
an error occurs so that we can see what went wrong - instead of the  
Application Error where we have to try and figure out what he was doing  
at the time… etc…

Thanks for the consideration.

---

<div class="post-metadata">

**Author:** ![hreyaatnh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/f17d59/32.png) [@hreyaatnh](https://www.ruby-forum.com/u/hreyaatnh)\
**Post date:** [March 16, 2006, 3:41pm UTC](https://www.ruby-forum.com/t/application-error-rails/81941/4 "2006-03-16T15:41:18Z")

</div>

in production.rb

change  
ActionController::Base.consider\_all\_requests\_local = false

to

ActionController::Base.consider\_all\_requests\_local = true

On Thursday, March 16, 2006, at 2:20 PM, Richard W. wrote:

> Thanks for the consideration.  
> [http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)  
> Mikkel B.

www.strongside.dk - Football Portal(DK)  
[nflfeed.helenius.org](http://nflfeed.helenius.org) - Football News(DK)  
ting.minline.dk - Buy Old Stuff!(DK)

---

<div class="post-metadata">

**Author:** ![hreyaatnh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/f17d59/32.png) [@hreyaatnh](https://www.ruby-forum.com/u/hreyaatnh)\
**Post date:** [March 16, 2006, 4:12am UTC](https://www.ruby-forum.com/t/application-error-rails/81941/5 "2006-03-16T04:12:54Z")

</div>

is your configuration correct for the environment your server is running  
in? You need to be sure that sendmail (with the -i -t options) works or  
you  
have the correct smtp settings for ActionMailer

---

<div class="post-metadata">

**Author:** ![hreyaatnh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/f17d59/32.png) [@hreyaatnh](https://www.ruby-forum.com/u/hreyaatnh)\
**Post date:** [March 16, 2006, 4:21pm UTC](https://www.ruby-forum.com/t/application-error-rails/81941/6 "2006-03-16T16:21:25Z")

</div>

On Thu, 2006-03-16 at 14:20 +0000, Richard W. wrote:

> Thanks for the consideration.

* * *

I think you can adjust the environment file to act similarly - the issue  
is that the ‘tracebacks’ is more of what is considered ‘local’

There is a methodology to trap the errors and use ActionMailer to send  
an email (presumably to the developer) in the AWDWR book and I asked  
about this a week ago and I think the upshot was that something inside  
of Rails changed since the book was published that caught Dave  
unaware…

[http://wrath.rubyonrails.org/pipermail/rails/2006-March/023405.html](http://wrath.rubyonrails.org/pipermail/rails/2006-March/023405.html)

which suggests that following the methodology in the book is probably  
not a very good idea.

In my drive to finish the most perplexing problems so I can move on,  
this still remains on my list of things to do so it appears that the  
only methodology that _ **should** _ work would be here…

[http://wiki.rubyonrails.com/rails/pages/HowtoConfigureTheErrorPageForYourRailsApp](http://wiki.rubyonrails.com/rails/pages/HowtoConfigureTheErrorPageForYourRailsApp)

[http://wiki.rubyonrails.com/rails/pages/HowtoSendEmailWhenRailsThrowsAnException](http://wiki.rubyonrails.com/rails/pages/HowtoSendEmailWhenRailsThrowsAnException)

Craig

---

<div class="post-metadata">

**Author:** ![hreyaatnh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/f17d59/32.png) [@hreyaatnh](https://www.ruby-forum.com/u/hreyaatnh)\
**Post date:** [March 17, 2006, 3:25pm UTC](https://www.ruby-forum.com/t/application-error-rails/81941/7 "2006-03-17T15:25:10Z")

</div>

Thanks for the responses.

I will define a local\_request? method in the app as a solution.

class ApplicationController \< ActionController::Base  
def local\_request?  
false  
end  
end

---

<div class="post-metadata">

**Author:** ![hreyaatnh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/f17d59/32.png) [@hreyaatnh](https://www.ruby-forum.com/u/hreyaatnh)\
**Post date:** [March 24, 2006, 10:00pm UTC](https://www.ruby-forum.com/t/application-error-rails/81941/8 "2006-03-24T22:00:53Z")

</div>

> in production.rb
> 
> change  
> ActionController::Base.consider\_all\_requests\_local = false
> 
> to
> 
> ActionController::Base.consider\_all\_requests\_local = true

Exactly what I needed.

production.rb is config/environments/production.rb
