smtp.rb:14: [BUG] Segmentation fault

I just fixed a problem that I was running into on my Mac development machine. Things were running fine in my production environment (Heroku) but when I tried to send mail locally, I got the following error:

> rails c        
Loading development environment (Rails 3.0.8)
ree-1.8.7-head :001 > MyMailer.daily_email.deliver
~/.rvm/gems/ree-1.8.7-head@mygemset/gems/mail-2.2.19/
  lib/mail/core_extensions/smtp.rb:14: [BUG] Segmentation fault
ruby 1.8.7 (2011-02-18 patchlevel 334) [i686-darwin10.7.0]
zsh: abort      rails c

Hmm. I indeed use SMTP to send mail, but nothing too crazy. Plus it worked in production, and up until recently it was working locally. For more background, I was also using the Sendgrid plugin.

Read on →

The State of Ruby and Testing

At the May 2011 Indy.rb meetup, I suggested creating a survey to figure out what versions of Ruby people were using, and what testing stacks they use and would like to use. I created this survey and tweeted it out, and was impressed with the results! Over a hundred people filled out the information, from several continents and numerous countries. Thanks to everyone who participated!

The questions and their results

  • What versions of Ruby have you ever tried out?
  • What versions of Ruby do you currently use in production or for real apps?
  • What testing frameworks are your active projects using?
  • If you were starting a new Rails project right now, what testing frameworks would you use?
  • What mocking/stubbing frameworks are your active projects using?
  • If you were starting a new Rails project right now, what mocking/stubbing frameworks would you use?
  • What do your active projects use to populate testing data?
  • If you were starting a new Rails project right now, what would you use for populating testing data?

What versions of Ruby have you ever tried out?

Summary: a wide variety of Ruby versions used. What the heck is kiji, you might ask? This was a useful post on kiji.


What versions of Ruby do you currently use in production or for real apps?

Read on →

Ruby Filter Script

It's pretty easy to use a ruby script as part of a Linux or Unix pipe process to filter output of another script or set of commands. You can just use something like the following:

#!/usr/bin/env ruby

while line = STDIN.gets
  puts "filtered: #{line}"
end

The STDIN.gets is the magic. It just takes whatever the output of the preceding scripts and pipes it in. Then you can make the script executable and run it. If this script is named filter.rb, then you could run something like:

Read on →

April 2011 Customer Discovery Day

If you read through this post, you'll see some sweet pictures and figure out a potential new way to get cookies and brownies.

I got together with Alex Toumey, Kyle Shipley and Wes Winham on April 16 for an event practicing lean startup concepts.

We started off by pitching ideas that we thought were interesting and needed some validation. At one point, we riffed on one of the ideas by coming up with "Etsy for baked goods." The idea seemed kind of hokey at first, but the more we talked about it, the better it seemed. We put aside the other ideas for future exploration, and talked about our thoughts on the idea. We came up with a quick description to make sure everyone was on the same page: a marketplace for people to buy and sell local baked goods. Seemed good. What better time to test this idea against cold, harsh reality? :)

Brownies, or bullshit?

Next, we sketched out some basic hypotheses and some questions to test these hypotheses, and contacted friends and family to get some feedback. Someone took pictures of these, I'm sure, but I can't seem to find them, or I'd post them.

Read on →