我的Rmagic宝石停止工作了。因此,我尝试重新安装所有内容以使其再次正常工作。
到目前为止,我已经完成了一些步骤。
下载了不同版本以进行测试
ImageMagick-6.6.7-0-Q16-windows-dll.exe
ImageMagick-6.8.9-8-Q16-x64-dll.exe
ImageMagick-6.8.9-9-Q16-x64-dll.exe
安装在没有空格的路径中
"C:\RailsInstaller\ImageMagick"
安装时勾选了路径和标题设置
使用管理员权限打开cmd并运行
set CPATH=C:/RailsInstaller/ImageMagick/include
set LIBRARY_PATH=C:/RailsInstaller/ImageMagick/lib
试图安装
宝石安装rmagick
我收到错误消息
C:\Sites\website>gem install rmagick
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
C:/RailsInstaller/Ruby2.0.0/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.
C:/RailsInstaller/Ruby2.0.0/lib/ruby/2.0.0/mkmf.rb:431:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/2.0.0/mkmf.rb:562:in `try_cpp'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/2.0.0/mkmf.rb:1041:in `block in have_header'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/2.0.0/mkmf.rb:892:in `block in checking_for'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/2.0.0/mkmf.rb:337:in `block (2 levels) in postpone'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/2.0.0/mkmf.rb:307:in `open'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/2.0.0/mkmf.rb:337:in `block in postpone'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/2.0.0/mkmf.rb:307:in `open'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/2.0.0/mkmf.rb:333:in `postpone'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/2.0.0/mkmf.rb:891:in `checking_for'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/2.0.0/mkmf.rb:1040:in `have_header'
from extconf.rb:186:in `<main>'
重新安装并尝试以下版本对我有效后
Ruby 1.9.3
ImageMagic 6.6.7-0 Q15
我还运行了成功安装rmagic的命令
gem install rmagick --platform=ruby -- --with-opt-dir=C:\RailsInstaller\ImageMagick
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句