问题
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.
回答1:
It was happening here and I fixed it using:
gem pristine rmagick
Done! :-)
Source: https://github.com/mroth/lolcommits/issues/9
回答2:
Ok i got it working now by
- Uninstalling Imagemagick (i am using homebrew, so i run "brew remove imagemagick"
- Uninstalling the rmagick gem ("gem uninstall rmagick")
- Installing the rmagick gem again by running "bundle install"
I hope it helps
回答3:
This works for me (Ubuntu 12.04, Rails 3.2.12):
sudo apt-get install imagemagick libmagickwand-dev
and then:
bundle
来源:https://stackoverflow.com/questions/9686192/rails-rmagick-gem