← All articles
development

Ruby 1.9.3 [BUG] Segmentation with rspec

A leftover binding_of_caller gem in the Gemfile caused segmentation faults running rspec under Ruby 1.9.3. Here's how I tracked it down.

Donn Felker

Donn Felker

2013.03.21 · 1 min read · updated July 5, 2013

Recently I dealt with an issue with Agile Affiliate so I’m going to catalogue it here. Long story short – I was using the ‘binding_of_caller’ gem for rails. Well, one of my contractors was using it in dev and never took it out of the Gemfile. However, just this sitting in the Gemfile caused all kinds of segmentation faults when running rspec. I google’d around, reinstaled Ruby 1.9.3 with settings from a few Stack Overflow posts but still had no luck. The gem was the problem I eventually found by git bisecting the issue.

The segmentation faults looked like this:

AgileAffiliate/gems/actionpack-3.2.11/lib/action_dispatch/testing/assertions.rb:2: [BUG] Segmentation fault
ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-darwin12.2.0]

— Control frame information ———————————————–

This issue has been logged in the gem’s issue list here: https://github.com/banister/binding_of_caller/issues/14

Donn Felker

Written by Donn Felker

I've spent 25+ years shipping software, writing books, and running my own companies. I write about thinking clearly, working for yourself, and doing real work while AI rewrites the rules. New essays land here every week.

Get the newsletter

Keep reading