21 Mar 2011, 12:00pm
/dev/random
by

leave a comment

Nokogiri and Segmentation Fault

After recently re-installing my system on a new SSD everything was working fine except Rspec for a project running on Rails 2.3.5. Turns out there were a couple issues.

First, Rails was out of date. Upgrading to 2.3.11 fixed those issues.

Next, Nokogiri was throwing this error:

/Users/chris/Sites/adobe-agency-partner-portal/vendor/bundle/ruby/1.8/gems/nokogiri-1.4.4/lib/nokogiri/xml/schema.rb:37: [BUG] Segmentation fault
ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0]

In this case my version of libxml2 was causing the problems. Upgrading that to the latest and re-installing Nokogiri fixed that issue.

To see where you stand with Nokogiri, run this command:

~/Sites/adobe-agency-partner-portal (master⚔) : bundle exec nokogiri -v—
warnings: []

ruby:
engine: mri
version: 1.8.7
platform: i686-darwin10.6.0
libxml:
loaded: 2.7.8
binding: extension
compiled: 2.7.8
nokogiri: 1.4.4