Application error (Rails)

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!

What is your log displaying?

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.

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
Mikkel B.

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

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

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

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/HowtoSendEmailWhenRailsThrowsAnException

Craig

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

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