Rails Rmagick gem

蓝咒 提交于 2019-12-24 08:35:04

问题


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

  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




回答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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!