Always define controller action methods in Rails 3

This morning was spent puzzling over a strange hard-to-reproduce Cucumber test failure in a project I have been upgrading from Rails 2.3.x to 3.0.3. It was only occurring after certain steps had been taken in previous Scenarios, and not when the failing Scenario was run on its own.

The solution was to explicitly define the controller action’s method in the controller. So the question to the world is: what changed, ActionController or something in the Cucumber chain?

Cheffin ain’t EZ for beginners

When I first set out to learn Chef I found that most of the blog posts, tutorials and even the Opscode Help pages themselves were a bit difficult to understand, to say the least. The ontology surrounding Chef is pretty hard to grasp for beginners: Resources, Clients, Nodes, knife, chef, Chef Server, Shef, Cookbooks, Recipes and so on. What I really needed when I started out was a specific walk-through of anything so long as it worked. And a lot of stuff doesn’t.
Continue reading “Cheffin ain’t EZ for beginners”

Uploading directly to Amazon S3 from a Rails application

The use cases for Superhug are heavy on uploading and downloading large(ish) files. Rails itself isn’t so well suited to this sort of task, and it’s best to keep state away from application servers wherever possible. We chose to use Amazon S3 and CloudFront to bypass Rails for all of the uploading, downloading and image processing grunt work. This is a rundown of the approach we took.
Continue reading “Uploading directly to Amazon S3 from a Rails application”