0

现在我正在尝试使用 Rails 4.0.2 通过 Ruby 语言打开 SVG 文件以从中获取数据,
首先我使用此命令 [ gem install nokogiri] 安装了“nokogiri”,因为我使用的是 Windows 7
,然后当我尝试使用此命令 [ gem install fileutils]安装“fileutils”

但我总是收到此错误

Blockquote
C:/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf.rb
检查 Ruby 版本 >= 1.8.5... 是
驱动器规格无效。
无法获取 ImageMagick 版本
* extconf.rb 失败 *
由于某种原因无法创建 Makefile,可能缺少
必要的库和/或头文件。
检查 mkmf.log 文件以获取更多
详细信息。
您可能需要配置选项。


为什么我得到这个错误?

4

1 回答 1

1

Seems like you need to install imagemagick first. You can download it from the official project page:

http://www.imagemagick.org

This should do it for you. Generally I suggest you to not to use Windows to develop. Ruby and Rails arent performing well on Windows and you can totally forget running a rails app on a windows host in production mode.

// you cant install imagemagick using the command gem install rmagick because rmagick is a wrapper for imagemagick but doesnt include the binary files. You need to install imagemagick first. To do that go to the website I posted => Binary Releases => Windows => Download ImageMagick-6.8.8-2-Q16-x64-dll.exe and install it. Then run bundle install again.

Also it can be a problem using windows when the rmagick gem isnt made for windows operating systems. Again: I strongly suggest you tu use a Linux Operating system for everything that is related to ruby, rails or programming web stuff.

于 2014-01-19T12:30:24.913 回答