ImageMagick - “未找到CORE_RL_magick_.dll”或者如何使用ruby 1.9.2在Windows上安装RMagick [英] ImageMagick - "CORE_RL_magick_.dll not found" or how to install RMagick on windows with ruby 1.9.2

查看:317
本文介绍了ImageMagick - “未找到CORE_RL_magick_.dll”或者如何使用ruby 1.9.2在Windows上安装RMagick的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一款Rail3应用。
经过几个小时的努力,最后在win7x64 / ruby​​ 1.9.2上安装了rmagick 2.13.1 gem而没有错误,我遇到了另一个错误。是的,我听说Windows中的rails体验可能很痛苦......

I'm working on a Rail3 app. After struggling for several hours and finally installing the rmagick 2.13.1 gem without errors on win7x64 / ruby 1.9.2, I've run into another error. Yeah, I've heard that rails experience in windows could be painfull...

我使用carrierwave处理并将图像上传到AWS S3。
处理看起来像

I use carrierwave to process and upload images to AWS S3. Processing looks like

class IconUploader < CarrierWave::Uploader::Base

require 'rmagick'
include CarrierWave::RMagick
... 
process :resize_to_fit => [100, 100]
process :convert => :png
...

当我在我的开发机器上触发文件上传时,它会抛出我是一个Windows弹出窗口,说

When I trigger file upload on my development machine, it throws me a windows popup, saying


未找到CORE_RL_magick_.dll

CORE_RL_magick_.dll not found

谷歌对这个没什么帮助。

Google wasn't really helpful on this one.

我的PATH变量设置为C:/ ruby​​192 / ImageMagick - 我安装的地方ImageMagick来。此文件夹有几个CORE_RL dll,包括 magick DLL本身不会丢失!

I have my PATH variable set to C:/ruby192/ImageMagick - its where I have installed ImageMagick to. And this folder has several CORE_RL dlls including the magick one. The DLL's themselves are not missing!

irb> require'rmagick'返回true
convert -version 输出:

irb > require 'rmagick' returns true and convert -version outputs this:

Version: ImageMagick 6.6.9-6 2011-04-14 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2011 ImageMagick Studio LLC
Features: OpenMP

所以我有几个问题。


  1. 如何解决这个问题?

  2. elseif 我没有, windows和heroku是否支持任何其他宝石和/或图形库?

  3. else 也许有办法配置carrierwave,而不是在开发环境中处理图像

  1. How do I solve this?
  2. elseif I don't, are there any other gems and/or graphic libraries that are supported by both windows and heroku?
  3. else maybe there is a way to configure carrierwave, not to process images in dev environment

到目前为止,我尝试过ImageMagick v 6.6.9 32bit dll,它给出了CORE_RL dll错误,
64位静态,没有用于编译rmagick gem的开头,
和64位动态,这给了我吨未定义引用错误,每个测试,除了第一个:

So far I've tried ImageMagick v 6.6.9 32bit dll, which gives the CORE_RL dll error, 64 bit static, which doesn't have dev headers to compile the rmagick gem, and 64 bit dynamic, which gives me tonns of undefined reference errors during the gem compilation, every test, except the first one:

checking for snprintf() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... yes
checking for AcquireImage() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... no
and so on...

谢谢大家。

推荐答案

我终于成功安装了ImageMagick并构建RMagick gem并使其全部工作。 Hooray。

I've finally managed to install ImageMagick and build the RMagick gem and make it all work. Hooray.

似乎问题出在DLL本身。当我试图注册它时,windows给了我一个关于dll问题的错误。

It seems like the problem was in the DLL itself. When I tried to registed it, windows gave me a nice error about a problem with the dll.

所以我解决所有问题的方法是:

So my way of solving all the issues is:


  1. 这里

  2. 下载ImageMagick 6.6.1-10 32位动态或任何其他版本,目前最新版本6.6.9除外一些DLL问题

  3. 使用选项安装它:添加到PATH和开发标题。 安装路径不应包含空格
    安装完成后,它会给你一个关于成功dll注册的消息框。

  4. 在命令行中输入convert -version来检查一切是否正常。它应该打印如下:

  1. Go here
  2. Download ImageMagick 6.6.1-10 32bit dynamic or any other version except the currently latest release 6.6.9, which has some DLL issues
  3. Install it with options: Add to PATH and development headers. Installation path should not contain spaces. After the installation it should give you a message box about succesful dll registration.
  4. In the command line type convert -version to check if everything works. It should print something like:

版本:ImageMagick 6.6.1-10 2010-05-15 Q16 http://www.imagemagick.org
版权所有:Copyright(C)1999-2010 ImageMagick Studio LLC
Features:OpenMP

Version: ImageMagick 6.6.1-10 2010-05-15 Q16 http://www.imagemagick.org Copyright: Copyright (C) 1999-2010 ImageMagick Studio LLC Features: OpenMP

如果您安装 DevKit 还没有。

它应该打印

Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...

几分钟后如果一切正常,你应该看到

And after a few minutes if everything goes right, you should see

Successfully installed rmagick-2.13.1
1 gem installed
Installing ri documentation for rmagick-2.13.1...
Installing RDoc documentation for rmagick-2.13.1...

和而已。希望这可以节省一些人在挫折中浪费几个小时。

And that's it. Hope this saves somebody from wasting several hours in frustration.

还有两个有用的链接: 1 2 如果仍然无法安装

Just two more links that were helpful: 1 and 2 if you still can't install

这篇关于ImageMagick - “未找到CORE_RL_magick_.dll”或者如何使用ruby 1.9.2在Windows上安装RMagick的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆