rmagick and OS X Lion

北城以北 提交于 2019-11-27 00:51:14

问题


Just upgraded (i.e. not a new install) to Lion from Leopard and my previously well-working rmagick now doesn't work anymore and gives me this error:


Your Rack app raised an exception when Pow tried to run it.

LoadError: dlopen(/Users/rassom/.rvm/gems/ruby-1.8.7-p334/gems/rmagick-2.13.1/lib/RMagick2.bundle, 9): Library not loaded:
/System/Library/Frameworks/OpenCL.framework/Versions/A/Libraries/libclparser.dylib
Referenced from: /Users/rassom/.rvm/gems/ruby-1.8.7-p334/gems/rmagick-2.13.1/lib/RMagick2.bundle
Reason: image not found - /Users/rassom/.rvm/gems/ruby-1.8.7-p334/gems/rmagick-2.13.1/lib/RMagick2.bundle
~/.rvm/gems/ruby-1.8.7-p334/gems/rmagick-2.13.1/lib/RMagick2.bundle
~/.rvm/gems/ruby-1.8.7-p334/gems/rmagick-2.13.1/lib/rmagick.rb:11
~/.rvm/gems/ruby-1.8.7-p334/gems/bundler-1.0.15/lib/bundler/runtime.rb:68:in `require'
~/.rvm/gems/ruby-1.8.7-p334/gems/bundler-1.0.15/lib/bundler/runtime.rb:68:in `require'
~/.rvm/gems/ruby-1.8.7-p334/gems/bundler-1.0.15/lib/bundler/runtime.rb:66:in `each'

Tried uninstalling rmagick and re-installing, but that didn't help.

Does anybody have a solution?

Thanks :-)


回答1:


I had the same problem and resolved it by uninstalling ImageMagick, removing the rmagick gem and running bundle install again.

Make sure the rmagick gem is completely gone from your ~/.rvm/gems/ruby-1.8.7-p334/gems/ folder before re-installing and running bundle install and it should at least get you beyond that error.




回答2:


I've found this: https://stackoverflow.com/questions/6674666/installing-imagemagick-leads-to-weird-error-involving-opencl

Copied /System/Library/Frameworks/OpenCL.framework/Versions/A/Libraries/libclparser.dylib from 10.6 computer into the same folder on 10.7.

The file, i've uploaded here: http://www.workdreamer.com/uploads/libclparser.dylib




回答3:


In my case, the error occurred after ImageMagick was upgraded via homebrew. Unlike @Marcus' answer, I did not have to uninstall ImageMagick. All it took was:

$ gem uninstall rmagick
$ bundle

Cheers




回答4:


On Mac OSX Lion (10.7) with imagemagick installaed through homebrew this one fixed my problem:

First of all remove the broken rmagick from your rvm installation path: ~/.rvm/gems/ruby-1.9.3-p194/gems/

Afterwards reinstall imagemagick through brew and then run bundle again:

brew uninstall imagemagick
brew install imagemagick
bundle



回答5:


Because I previously used 'bundle package' in my rails app, just uninstalling and reinstalling the gem didn't solve the problem, because a copy remained in vendor/. Removing the copy in vendor/ and running bundle install again fixed the problem.




回答6:


Here is my full checklist to upgrade ruby environment to Mountain Lion: http://tektastic.kig.re/2012/07/getting-rmagic-and-friends-to-work-on.html

[ -- fixed June 19, 2007 ]



来源:https://stackoverflow.com/questions/6589066/rmagick-and-os-x-lion

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