Ruby Weekly is a weekly newsletter covering the latest Ruby and Rails news.

Interesting Ruby Tidbits That Don’t Need Separate Posts #11

By Peter Cooper / November 30, 2007

Amazon EC2 (Elastic Compute Cloud) Control Library

amazon-ec2 is a super slick library that makes it super-easy to control Amazon EC2 instances in Ruby code. It also comes with a special shell "ec2sh" that gives you a much nicer (in my opinion) interface to control and manipulate EC2 instances than the usual command line tools provided by Amazon. The documentation for this is superb with examples of using all of the various methods it provides, ec2sh, and examples of EC2 control from Ruby and Rails apps.

RubyWorks Production Stack on Amazon EC2

Continuing with the Amazon EC2 theme, Nutrun posts about rubyworks-ec2, a set of Capistrano recipes and utilities to deploy the Rubyworks Production Stack (a complete Ruby and Rails stack) on Amazon EC2 instances. The stack includes Apache 2, HAProxy load balancer, Mongrel, monit, and a bunch of other useful tools. If you want a way to get a Rails / Ruby stack running on an EC2 instance in minutes, this is essential reading.

Simple Geocoding in Ruby

The Cartographer library is an old-time favorite for doing geocoding from Rails applications. A developer with Assay Depot, however, decided that a more direct approach of querying Google for the results was necessary. The result is a 49 line module that can return latitude, longitude, address, street, and other geographical information when provided with, say, a ZIP or a street address.

Tutorial for Installing and Configuring Nginx and Rails on Ubuntu

James O'Kelly has put together a comprehensive tutorial going through all of the stages necessary to install and configure Nginx and Rails together to run applications on an Ubuntu server. James' blog is definitely worth a look (and perhaps to subscribe to!) as he seems to have a knack for regularly putting together good Rails (and especially Mephisto) focused posts.

Presentation: Haml and Sass in 15 Minutes

Haml is a markup language commonly used by Rails developers that makes it easy to produce well-formatted, valid XHTML in as few lines as possible. Sass is similar, but for CSS (supporting nested rules, referencing parent rules, and lots of other time saving goodness). In "Haml and Sass in 15 Minutes", Patrick Crowley guides us through using these two technologies.


  1. Dan says:

    Is it just me, or does anyone else think the amazon-ec2 library is a bit of a leaky abstraction? The XML from Amazon is parsed using XmlSimple, and exposed through the programming interface; meaning all the code you write with the library is tightly coupled to Amazon's XML. A change in the XML, and the dependent code could break.

    I applaud the developers of the library, but perhaps another layer needs to be created that abstracts the XML away, so you deal with Ruby objects and Ruby-ish code. (IMHO the straight translation from Amazon's XML to Ruby code currently results in some non-Ruby-ish looking code) Changes in the XML structure should not break dependent code, except in cases where something is removed from the XML API.

  2. wear says:

    There is another good presentation on haml and sass, which is

Other Posts to Enjoy

Twitter Mentions