Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rake tasks require Rails #32

Closed
raykrueger opened this issue Jun 4, 2013 · 5 comments
Closed

Rake tasks require Rails #32

raykrueger opened this issue Jun 4, 2013 · 5 comments

Comments

@raykrueger
Copy link

I am trying to evaluate Honeybadger as a replacement for Airbrake in our Sinatra based app. Most of it was drop in replacement, except Rake.

After adding require 'honeybadger/tasks' to my Rakefile I ran into the first problem.

The first thing I encountered was a load error around action_controller/test_process. I forked the project and moved that line into the LoadError rescue that was already there just below it.

Next it seems to go into a fully Rails based process for sending the test exception. At this point I don't see a way forward with the amount of Rails tie in there is here.

Am I using the wrong rake tasks file perhaps?

@joshuap
Copy link
Member

joshuap commented Jun 4, 2013

Hi Ray,

The rake tasks are only meant to be used with Rails, so that's no surprise. Does the Airbrake test task run in your Sinatra app?

Besides the rake tasks, Honeybadger is compatible with any Rack app, including Sinatra. Here's an example project I made a while back:

https://github.com/honeybadger-io/honeybadger-sinatra-example

-Josh

@joshuap joshuap closed this as completed Jun 4, 2013
@raykrueger
Copy link
Author

I needed the Rake tasks for the Capistrano deploy notification to work. I ended up writing my own capistrano task to do the notification without Rake.

Why do the Rake tasks require Rails? Seems to me that the deploy and test actions could easily be implemented without needing Rails involved.

@joshuap
Copy link
Member

joshuap commented Jun 4, 2013

Ah, wait. Have you tried loading honeybadger/shared_tasks? That contains the deploy related tasks, and they should be Rails-independent. You may need to set ENV['API_KEY'] to your Honeybadger API key before executing the Capistrano task, however. I'll add a todo to improve this.

@raykrueger
Copy link
Author

NOPE! heh Honestly I was on the train and ran out of time to dig any deeper. I was following the capistrano instructions there.

My custom capistrano notification works, I should switch it to use the honeybadger_tasks module though.

Also, Honeybadger is awesome so far. Signed up this morning and deployed a little later. We were gonna run Airbrake and Honeybadger side by side for a bit, but I think we'll rip out Airbrake this afternoon.

@joshuap
Copy link
Member

joshuap commented Jun 4, 2013

Awesome! Glad you are enjoying it, we work really hard on it. Honestly I haven't visited the shared tasks outside of Rails in sometime - it's now on my todo list. One of our goals for v2 of the gem is to make it more framework independent - we recently removed an ActiveSupport dependency to that end.

Also, here is a blog post I wrote about creating your own capistrano task without rake, in case you want something similar to what the rake task does: https://www.honeybadger.io/blog/2012/10/06/honeybadger-and-capistrano

Feel free to email us at support@honeybadger.io if you have any more suggestions - we love to hear from customers. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants