我目前正在升级一个旧的rails应用程序以使用Rails 3和Ruby 1.9.2,而RMagick是我需要安装的最后一个gem.但是,Windows似乎没有任何1.9.2下载,标准的gem安装RMagick也不起作用.
有人能指出我如何安装这个宝石的正确方向吗?
我正在开发一款Rail3应用程序.经过几个小时的努力,最后在win7x64/ruby 1.9.2上安装了rmagick 2.13.1 gem而没有错误,我遇到了另一个错误.是的,我听说过在windows中使用rails可能会很痛苦......
我使用carrierwave处理图像并将其上传到AWS S3.处理看起来像
class IconUploader < CarrierWave::Uploader::Base
require 'rmagick'
include CarrierWave::RMagick
...
process :resize_to_fit => [100, 100]
process :convert => :png
...
Run Code Online (Sandbox Code Playgroud)
当我在我的开发机器上触发文件上传时,它会抛出一个Windows弹出窗口,说
找不到CORE_RL_magick_.dll
谷歌对此并不是很有帮助.
我将PATH变量设置为C:/ ruby192/ImageMagick - 我已经安装了ImageMagick.这个文件夹有几个CORE_RL dll,包括magick.DLL本身不会丢失!
irb > require 'rmagick'返回true并convert -version输出:
Version: ImageMagick 6.6.9-6 2011-04-14 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2011 ImageMagick Studio LLC
Features: OpenMP
Run Code Online (Sandbox Code Playgroud)
所以我有几个问题.
elseif 我没有,是否还有Windows和heroku都支持的其他宝石和/或图形库?else 也许有一种方法可以配置carrierwave,而不是在开发环境中处理图像到目前为止,我已经尝试了ImageMagick v 6.6.9 32bit dll,它给出了CORE_RL dll错误,64位静态,没有用于编译rmagick gem的dev头,以及64位动态,这给了我很多undefined reference错误.宝石编译,每个测试,除了第一个:
checking for snprintf() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... …Run Code Online (Sandbox Code Playgroud) 我使用了ruby 1.9.2和rails 3.0.3.我试图安装rmagick gem但是当我运行时bundle install我得到一个错误告诉我:
Installing rmagick (2.12.1) with native extensions c:/Ruby192/lib/ruby/site_ruby
/1.9.1/rubygems/installer.rb:529:in `rescue in block in build_extensions': ERROR
: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)
c:/Ruby192/bin/ruby.exe extconf.rb
checking for Ruby version >= 1.8.5... yes
checking for stdint.h... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib …Run Code Online (Sandbox Code Playgroud)