I\'ve been banging my head against the wall for the better part of an hour trying to figure out what\'s going wrong here, and I\'m sure (or rather hoping) it\'s something fa
Not an answer, just my experiences:
I also stumbled on this problem in one of my own projects. I have this problem on os x (snow leopard) using ruby-1.9.2-p0, and ruby-1.9.2-p136.
What was particularly confusing to me was that I can read in an image using rmagick via rails console. But when I hit the exact same line from my rails app it blows up the same way as outlined above.
Rebuilding imagemagick via homebrew as outlined above wasn't enough for me. I also had to delete the rmagick gem and rebuild it via bundle.
For those using MacPorts, ImageMagick 6.6.5 and Ruby 1.9.2.
port uninstall ImageMagick
port edit ImageMagick
--disable-openmp
to configure.args
(near line 100)port install ImageMagick
Worked for me :)
I tried CaptainPete's MacPorts solution. It built 6.6.6-0 and still had the same problem. Switching to brew to do the build did the trick. Note that brew built 6.6.4-5. It's possible there are multiple bugs or a new bug in 6.6.6 that causes similar problems to occur.
If you have already installed imagemagick with brew, use this:
brew upgrade -f imagemagick --disable-openmp
The crash may be due to accessing ImageMagick on a thread under OSX MacPorts. See post.
None of these answers fixed it in my case.
After investigating further, I found that I was calling .resample
on a 0.02dpi image (I pull the images from a 3rd party API so I had no idea). This was even prompting a "disk almost full" alert message after the segmentation fault error would show up.