Can't get Rails 3 integration to work

42 views
Skip to first unread message

James MacAulay

unread,
Oct 15, 2010, 4:41:33 PM10/15/10
to Hoptoad Notifier Dev
I'm testing out Hoptoad with a bare Rails 3 project.

I followed the instructions to bundle install the gem and run the
generator and so forth. The rake hoptoad:test runs fine, and I can see
the error in the hoptoad admin.

However, when I access the following controller action:

def index
raise 'hell'
end

...hoptoad is not notified. Furthermore, I get a NoMethodError when I
try to use notify_hoptoad instead.

I dug into the code and it seems that 'hoptoad_notifier/rails' is
never required, and therefore HN::Rails::ActionControllerCatcher is
never included in AC::Base. When I manually require 'hoptoad_notifier/
rails' (in config/initializers/hoptoad.rb), I get a NameError
"undefined method `rescue_action_in_public' for class
`ActionController::Base'". It looks like that method is now in
ActionDispatch::ShowExceptions, so I made the following patch to
rails.rb, which also includes a change to the middleware insertion
code, because ActionController::Failsafe is not found in the
middleware stack:

https://gist.github.com/1662b796162234391859

The patch lets the server start correctly, but I'm still not seeing
errors from the controller in the hoptoad admin when I expect to.

Is anyone else actually using Hoptoad with Rails 3? What am I missing
here?

Thanks,
James

Jason Morrison

unread,
Oct 15, 2010, 4:52:48 PM10/15/10
to Hoptoad Notifier Dev
Hi James,

Can you please open this as an issue via the Tender site at
http://help.hoptoadapp.com/dashboard? This mailing list is intended
for discussion about the development of notifiers. Opening an issue
in Tender will make sure the support staff will see the issue and
should be able to get back to you more quickly.

Thanks!
-Jason

Jason Morrison

unread,
Oct 15, 2010, 4:53:25 PM10/15/10
to Hoptoad Notifier Dev
Looks like I posted that at the same time you reposted to the support
forum :)

On Oct 15, 4:41 pm, James MacAulay <jmacau...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages