resque-statsd icon indicating copy to clipboard operation
resque-statsd copied to clipboard

Update to work with Bundler & Rails 3.0 and make easier to apply

Open matellis opened this issue 14 years ago • 6 comments

Hello

Thanks for developing resque-statsd. We had some difficulty using this with Rails 3.0 & Bundler. Specifically, the way we had to use environment variables meant we couldn't simply add extend Resque::Plugins::Statsd in the right places like we do with other extensions because the initializer hadn't run yet.

Our patch doesn't work with Rails 2.x, it would need to be adjusted to try both ENV['RAILS_ENV'] as well as Rails.env.

Thanks

Mat & Jon

matellis avatar Aug 25 '11 20:08 matellis

Thanks for contributing! I've actually lost my statsd/graphite setup due to a cloud server failure and my lack of time to get it back up, so I haven't messed around with it for quite some time. But, you've given me incentive to get it back up and test all this. Super busy this week, hope to get it in this weekend and I'll happily merge your commits.

Cheers, Jason

jamster avatar Aug 25 '11 20:08 jamster

We have a working puppet recipe if that helps, let me know if you'd like a copy.

M.

On Aug 25, 2011, at 1:46 PM, jamster wrote:

Thanks for contributing! I've actually lost my statsd/graphite setup due to a cloud server failure and my lack of time to get it back up, so I haven't messed around with it for quite some time. But, you've given me incentive to get it back up and test all this. Super busy this week, hope to get it in this weekend and I'll happily merge your commits.

Cheers, Jason

Reply to this email directly or view it on GitHub: https://github.com/jamster/resque-statsd/pull/1#issuecomment-1903774

matellis avatar Aug 25 '11 21:08 matellis

Yep, if you have that script handy, that would be great!

jamster avatar Aug 26 '11 13:08 jamster

Install puppet, then put this somewhere and run:

puppet apply graphite.pp

Enjoy!

M. PS: Designed for ubuntu

On Aug 26, 2011, at 6:29 AM, jamster wrote:

Yep, if you have that script handy, that would be great!

Reply to this email directly or view it on GitHub: https://github.com/jamster/resque-statsd/pull/1#issuecomment-1912542

matellis avatar Aug 26 '11 14:08 matellis

didn't see an attachment. was there one? (never used puppet before, is it like ruby gems where it will pull from a centralized source?)

jamster avatar Aug 28 '11 14:08 jamster

Here are the contents of the attachment. If you've not used puppet before it might be a bit of a pain.

On an ubuntu system copy the contents of this file to graphite.pp and do the following:

gem install puppet puppet apply graphite.pp

It should work but it might not, if your ubuntu system is setup in a different way you might find a few dependencies missing but it might just work. Add --debug to the puppet command if you want to debug it, or you can just read the recipe and run the commands/install the packages manually.

Good luck.

M.

On Aug 28, 2011, at 9:24 AM, jamster wrote:

didn't see an attachment. was there one? (never used puppet before, is it like ruby gems where it will pull from a centralized source?)

Reply to this email directly or view it on GitHub: https://github.com/jamster/resque-statsd/pull/1#issuecomment-1923983

matellis avatar Aug 28 '11 14:08 matellis