Ruby

http://s.erious.ly

Author Archive

Chef: Quick and Tasty Ruby Powered Server Configuration

chefChef isn't exactly new, but I've been looking into it recently after briefly talking to Lindsay Holmwood at Rails Underground.

Basically, Chef is a Ruby-based configuration management engine. You set up recipes for how you want your system configured, and then Chef will cook it up for you. ...

The Rails Underground 2009 Keynotes: Fred George and Yehuda Katz

rails undergroundI attended the Rails Underground conference in London at the weekend (July 24-25, 2009). As always seems to be the case at these events, I got the most value out of the more theoretical and opinion-based talks rather than 'how-to' style presentations. Having said that, Pat Allan...

Backgrounded: A Simple Wrapper for Ruby Background Tasks

Like Ryan Sonnek, I've dabbled with a few different ways to run background processes in my Ruby apps, even resorting to knocking together my own (far from perfect) solution. As Ryan says on his blog, many popular libraries have complicated interfaces and don't "feel right".

I tend to...

Make any Ruby object Rack-friendly with Rackable

François Vaux has recently published a Ruby module called Rackable which allows you to make any Ruby object Rack-friendly, providing it with a REST-like interface.

What does this mean? Well, a Rack application is essentially a Ruby object that responds to call(). Rackable just gives your object a call method...

Patron: A Simpler Ruby HTTP Client for Ruby

Phillip TolandUntil recently, I had been using the Curb library for making HTTP requests with Ruby, and I must say I was fairly happy with it. Phillip Toland, on the other hand, wasn't satisfied with Curb's API and the fact that it is tricky to modify (being implemented...

Siren: a JSONQuery interpreter for Ruby

sirenSiren is a JSON and JSONQuery interpreter for Ruby by James Coglan. Before I dive into talking about Siren, a little bit of background:

JSON is a lightweight, human-friendly data interchange format, for which there is already good Ruby support in the form of the json...

Alias: Enhance Your Ruby Console/irb Experience

aliasA couple of weeks ago we featured Gabriel Horner's Hirb framework for formatting irb output. I've recently been playing with another of his projects, Alias, which further enhances the Ruby Console experience (but it conceivably could be used in your Ruby programs too).

It's already possible to set up...

Gibbler: Git-like Hashes and History for Ruby Objects

gibblerInspired by Git (the version control system), Delano Mandelbaum has come up with a library called Gibbler, which produces hashes and history for Ruby objects.

Calling the gibbler method on an object will produce a 40 byte git-like SHA1 hash (or you can use gibbler.short to get just the...

Parkaby: Faster HTML Generation with Ruby

Why's Markaby is a really convenient bit of Ruby for generating HTML in your applications, rather than having to fiddle about with string interpolation or ERb, tangling together HTML and Ruby.

However, Markaby can be slow compared with other options like Erubis or HAML. Magnus Holm has been working on an...

Build Safer Ruby Daemons with RobustThread

When running a Ruby daemon which executes code in a loop, if the process is killed while something is happening then problems can occur if the code doesn't handle all the exceptions properly or if the loop isn't broken cleanly. RobustThread is a Ruby class by Jared Kuolt...

Easy Web Spidering in Ruby with Anemone

anemone Anemone is a free, multi-threaded Ruby web spider framework from Chris Kite, which is useful for collecting information about websites. With Anemone you can write tasks to generate some interesting statistics on a site just by giving it the URL.

Its only dependency is Nokogiri (an HTML and...

Getting Started with MongoDB and Ruby

mongo mapper MongoDB a is a high-performance, open source, schema-free, document-oriented database written in C++. It's sort of a cross between scalable key/value stores and traditional functionality-rich relational databases.

MongoDB might be useful as a fast, simple, non-transactional data store for a web...