Category Archives: Ruby

Rake Part 4: Pathmap

Continuing our series on Rake, today we look at one of its most powerful (and little-known!) features Continue reading

Posted in Ruby, RubyTapas Samples, Screencasts | Tagged , | Leave a comment

Rake Part 3: Rules

In this episode, we teach Rake how to intelligently discover the right source file for a given target. Continue reading

Posted in Ruby, RubyTapas Samples, Screencasts | Tagged , | Leave a comment

Rake Part 2: File Lists

How to pick out all the files we want, and none we don’t, using Rake’s FileList class. Continue reading

Posted in Ruby, RubyTapas Samples, Screencasts | Tagged , | 4 Comments

Rake Part 1: Files and Rules

Part one of a series on the Rake build utility. In this post we start with Rake basics. Continue reading

Posted in Ruby, RubyTapas Samples, Screencasts | Tagged , | Leave a comment

Dotenv for multiple environments

Lately I’ve been handling configuration entirely through environment variables for my apps, as the 12 Factor App recommends, and I can’t recommend this approach enough. As a constraint it helps me think about what parts of a given app¬†actually¬†need to … Continue reading

Posted in Howto, Ruby | Tagged , | 6 Comments

Exception Causes in Ruby 2.1

Sometimes when rescuing an exception in Ruby, it’s useful to handle the error scenario by raising another, different exception. As an example, we may want to add domain-specific failure information before passing the error on to client code. begin # … Continue reading

Posted in Ruby | Tagged | 5 Comments

Watch me build an app (one day sale!)

As I posted a few months ago, the good folks at TekPub recently took my hours of footage of a weekend coding project and turned it into a tightly edited hour-and-fifteen-minute screencast. Well, as you might have heard, TekPub has … Continue reading

Posted in Announcements, Rails, Ruby, Screencasts, Videos | Leave a comment

RubyTapas Freebie – Gem-Love Part 3

Sometimes on RubyTapas I serialize larger projects into bite-sized pieces. In this episode, you can see a slice of the outside-in TDD process I use as I develop part of my gem-love project. You’ll see me thinking about messages before … Continue reading

Posted in Ruby, RubyTapas Samples, Screencasts | Tagged , , , , , | Leave a comment

RubyTapas Freebie: Enumerator

It’s been a while since I posted a freebie. Today’s is episode 59. It covers one of the most interesting (to me) classes in the Ruby core libraries: Enumerator.

Posted in Ruby, RubyTapas Samples, Screencasts | Tagged , | Leave a comment

Bounded Queue in Ruby

I don’t post code on here nearly as often as I should. Here’s some code I just finished for a future RubyTapas episode. It implements a thread-safe, optionally bounded, timeout-enabled queue class suitable for communication between threads. Please throw rocks … Continue reading

Posted in Ruby | Tagged , , | 2 Comments