GithubHelp home page GithubHelp logo

Comments (11)

allspiritseve avatar allspiritseve commented on May 27, 2024

I think I figured this out. I only have exception notifications set up in production, so when running my tests this conditional returns false:

if @Notifier = Rails.application.config.middleware.detect{ |x| x.klass == ExceptionNotifier }

So that's why @exception is nil, but I can't figure out why it's still trying to render the email view.

from exception_notification.

barmstrong avatar barmstrong commented on May 27, 2024

Same problem here. I think you're right, because if I add the middleware in development it works correctly.

It must be rendering the template based off the method name background_exception_notification

As a work around I just set it to call background_exception_notification only if Rails.env.production?

A hard return (so it doesn't render the template) would also prob work there.

from exception_notification.

allspiritseve avatar allspiritseve commented on May 27, 2024

Yep, that's the workaround I'm using too.

from exception_notification.

masterkain avatar masterkain commented on May 27, 2024

Using rails 3-2-stable:

undefined method `detect' for #<Rails::Configuration::MiddlewareStackProxy:0x007fb64c2bd680>
/Users/kain/.rvm/gems/ruby-1.9.3-p0/bundler/gems/exception_notification-20122d24f3a2/lib/exception_notifier/notifier.rb:81:in `background_exception_notification'

from exception_notification.

smartinez87 avatar smartinez87 commented on May 27, 2024

@masterkain which Ruby version are you using?
It's working fine for me in Rails 3.2

from exception_notification.

masterkain avatar masterkain commented on May 27, 2024

You can find the ruby version I'm using in the stack trace,1.9.3-p0; I'll try again in a few and report back.

from exception_notification.

smartinez87 avatar smartinez87 commented on May 27, 2024

please do, it works fine for me under Rails 3.2 and ruby 1.9.3-p0

from exception_notification.

smartinez87 avatar smartinez87 commented on May 27, 2024

@masterkain did it work or still no luck?

from exception_notification.

masterkain avatar masterkain commented on May 27, 2024

@smartinez87 sorry for the lack of info, I've been very busy, I'm going to try again.

from exception_notification.

masterkain avatar masterkain commented on May 27, 2024

@smartinez87 Rails 3.2.1, exception_notification master: all fine here it seems, thanks :)

from exception_notification.

smartinez87 avatar smartinez87 commented on May 27, 2024

Closing it then

from exception_notification.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.