简体   繁体   English

Rails Rmagick宝石

[英]Rails Rmagick gem

just installed rmagick gem but having this error in my console while trying to upload : 刚安装了rmagick gem,但尝试上载时在我的控制台中出现此错误:

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 资料来源: 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" 卸载Imagemagick(我正在使用自制软件,所以我运行“ brew remove imagemagick”
  2. Uninstalling the rmagick gem ("gem uninstall rmagick") 卸载rmagick gem(“ gem卸载rmagick”)
  3. Installing the rmagick gem again by running "bundle install" 通过运行“捆绑安装”再次安装rmagick gem

I hope it helps 希望对您有所帮助

This works for me (Ubuntu 12.04, Rails 3.2.12): 这对我有用(Ubuntu 12.04,Rails 3.2.12):

sudo apt-get install imagemagick libmagickwand-dev

and then: 接着:

bundle

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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