I hate writing and maintaining code which does extremely common things, so I’ve gone through a few rubygem management libraries over the years. Most recently I’m been using a library called Bones – it was OK, I guess. Better than doing it myself.
Recently, however, I’ve come across Jeweler – a clean, simple solution which really fits my needs. It’s git-aware – any files git knows about, it knows about, and includes effortlessly. It automatically handles binaries, it does version updates, it doesn’t require you to include numerous files of its own – just a short addition to an existing projects’ Rakefile will do the trick. In short, it’s exactly what I want and nothing more, and I’ve adopted it for my gem needs.
Another fantastic RubyGem I’ve stumbled across lately is DaemonKit, which is exactly what the name suggests – a kit for easily generating daemons in Ruby. It’s a little more complex than Jeweler, obviously, but it generates a logical and familiar directory structure – if you’re proficient in Rails you’ll instantly grok what everything is for. Putting together a daemon in Ruby has always been relatively easy, but somewhat time-consuming as you build your own structure with all the little bits you need – I find DaemonKit’s defaults to be pretty much exactly what I want as a base, and you can be up and running in minutes. Plus, since half the daemons I write these days seem to have something to do with AMQP, its explicit catering to this use case is particular welcome.
Combine the two and you’re in gem daemon heaven. Check them out.
Tags: ruby
May 20th, 2009 at 9:12 pm
Thanks for the great promotion of daemon-kit!
Jeweler integration is in the pipeline, still have plenty of other features to include as well prior to that. Gem generation becomes key, to make other projects that use daemon-kit as a base or to easily distribute your own project to your servers.
On the topic of distributing code, look out for capistrano/vlad support as well as god/monit config generation tasks. I need those as a higher priority
Best, and enjoy daemon-kit!
May 25th, 2009 at 9:48 pm
Thanks Kenneth – and thanks for the great work. The monit support sounds particularly exciting; I’ve been wondering how to do that too. And yeah – gem support would really turn it into a one-stop shop; having the executable in the path is invaluable, after all.
But it works great as is. I’ve already used it in 2 projects with more to come, so I owe you a beer if you’re ever in Sydney
Oh, and btw, thanks for your excellent AMQP vs XMPP post, I found that really helpful. I think like many others I’d been trying to give XMPP a chance – caught up in thinking XMPP was somehow the “right” way – but was pretty unhappy with it, while quite liking AMQP, so went searching for “fellow travellers” having the same thoughts. Your article, along with a couple of others, confirmed what I’d been suspecting and so helped me make the big decision. So, thanks again! : D