Touched by god (process monitoring)
Posted by glenn gillen on Dec 28, 2007
Posted in deployment, ruby on rails, system monitoring
The tag ling from the god website simply states “Like monit, only awesome”, and having played with it for a couple of days over the break now I have to agree. Monit was very handy at the time, but I found myself growing increasingly frustrated with it when things wouldn’t restart properly (stuck sockets with backgroundrb being an example), and it’s lack of logging only compounded the situation.
And then I found god.
Continue Reading…Giles Bowkett has created a very handy gem called utility belt. For those that find themselves forever delving into script/console or IRB, this can make life seem oh-so-fantastic.
Continue Reading…New Error Handling in Rails 2.0
Posted by glenn gillen on Dec 13, 2007
Posted in ruby on rails, error handling
Rails 2.0 has added in a very cool way to trap errors without a bunch of messy nested rescue blocks or case statements.
Continue Reading…Testing XML output in rspec and rails
Posted by glenn gillen on Dec 10, 2007
Posted in ruby on rails, rspec, testing, xml
Have you ever tried testing that you get the expected XML output from your rails respond_to block? Did you take the lazy way like me and think it would be as simple as comparing the body of the response with a string matching the expectant XML? Well there is a problem, if you’ve got multiple attributes on any elements you can’t always guarantee the order that the attributes will be output. So lets do it properly, and check it is valid XML and has the attributes we want.
Continue Reading…Correctly handling multiple time zones in ruby on rails
Posted by glenn gillen on Dec 06, 2007
Posted in ruby on rails, time zones
A recent client I was working for had the unfortunate situation where we’d both independently assumed we understood the requirements, without realising a missing piece of complexity. It was around time zones. The system was implemented with a cut-off date being US EST, but most of their clientele are in LA so it needed to be US PST. What is a developer to do?
Well it turns out that timezone_fu will come to the rescue.
Continue Reading…