Adding Thor Commands to Rails

Rails provides a nice documented way of adding Rake tasks to your engine, however sometimes you may want a command line operation that requires sophisticated interaction with the user, which can be tedious in Rake. Thor, is a great Ruby library designed for this purpose and its already built into Rails. In this post I'll go over how to create Thor commands and make them available through the rails command. If you're unfamiliar with Thor, take a look at the introduction, here to get up to speed.

Installing a Free SSL Certificate on Heroku

As search engines give priority to sites that implement HTTPS and more sensitive data is transmitted over the web its more important than ever to implement HTTPS on the entirety of your site. In this post we'll go over how to setup SSL on Heroku with a free certificate from Let's Encrypt

Saving My Photo Library From Picturelife Using Chrome and Ruby

In this post I show you how I figured out how to save my photo library from the quickly deteriorating Picturelife service using Ruby and Chrome.

Modules, Roles, Mixins, and *ables in Ruby


  • Blocks
  • Modules
  • Difference between including and extending Modules
  • Difference between instance and class methods


One of the most common problems that seem to naturally arise in code is handling objects that share a role. This tends to be an issue that is not immediately apparent, but as the application grows it begins to present itself. Let's illustrate this with a concrete example taken from the code used in this blog. A lot of this code will be ActiveRecord syntax, but the underlying concepts can be applied to plain old Ruby objects as well.