3

I'm trying to use Paperclip to upload some image. It's work fine but if I want add some style with :

:styles => { :small => "100x100" }

It does not work anymore, I have this error message :

myImage is not recognized by the 'identify' command.

So, I've found some tips on the web and I've installed ImageMagick with Brew then I've added

gem 'Rmagick'

to my GemFile.

And now when I restart my server, I get this message error :

/usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/rmagick-2.13.1/lib/rmagick.rb:11:in `require': dlopen(/usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/rmagick-2.13.1/lib/RMagick2.bundle, 9): Library not loaded: /usr/X11/lib/libfreetype.6.dylib (LoadError) Referenced from: /usr/local/lib/libMagickCore.5.dylib Reason: Incompatible library version: libMagickCore.5.dylib requires version 14.0.0 or later, but libfreetype.6.dylib provides version 10.0.0 - /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/rmagick-2.13.1/lib/RMagick2.bundle

I've updated my X11 and installed XQuartz, but nothing to do it's doesn't work anymore. I can restart rails server if I remove

gem 'Rmagick'

from my GemFile.

Any ideas ?

Thank you very much, I've spent 10 hours on this bug without figure out it !!

Bye

vpoulain
  • 740
  • 1
  • 7
  • 18

1 Answers1

2

Locate your libfreetype.6.dylib eg:

sudo find / -name "libfreetype.6.dylib" -print

Make sure that your version is 14.0.0 or later (the above is my path on macosx) eg:

otool -L /usr/X11/lib/libfreetype.6.dylib

If the version is right, maybe you have a library path problem.

Otherwise an update will fix.

  • Oh man ! You are my hero !! I've fixed it I didn't know what update, but I've found this lib with good version in an other folder, I've just replaced it ;) Thanks you ! – vpoulain Nov 13 '12 at 14:45
  • thx man you helped me solved bit unrelated problem with [Rmagick has not found libMagickCore.5.dylib](http://stackoverflow.com/questions/19040932/rmagick-complaining-about-libmagickcore-5-dylib-not-found-in-osx/19040933#19040933) – equivalent8 Sep 27 '13 at 00:43