简体   繁体   中英

Rails Rmagick gem

just installed rmagick gem but having this error in my console while trying to upload :

LoadError (dlopen(/Library/Ruby/Gems/1.8/gems/rmagick-2.13.1/lib/RMagick2.bundle, 9): Library not loaded: /System/Library/Frameworks/OpenCL.framework/Versions/A/Libraries/libclparser.dylib

  Referenced from: /usr/local/lib/libMagickCore.4.dylib
  Reason: image not found - /Library/Ruby/Gems/1.8/gems/rmagick-2.13.1/lib/RMagick2.bundle):
  app/uploaders/image_uploader.rb:8

Could any one please help ?

Thanks in advance.

It was happening here and I fixed it using:

    gem pristine rmagick

Done! :-)

Source: https://github.com/mroth/lolcommits/issues/9

Ok i got it working now by

  1. Uninstalling Imagemagick (i am using homebrew, so i run "brew remove imagemagick"
  2. Uninstalling the rmagick gem ("gem uninstall rmagick")
  3. Installing the rmagick gem again by running "bundle install"

I hope it helps

This works for me (Ubuntu 12.04, Rails 3.2.12):

sudo apt-get install imagemagick libmagickwand-dev

and then:

bundle

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM