简体   繁体   English

找不到ImageMagick版本-rmagick安装失败

[英]ImageMagick version cannot be found - rmagick install fails

Super confused and a first time Ruby user... I already have rmagick installed as denoted here: 超级困惑,是第一次使用Ruby的用户...我已经安装了rmagick,如下所示:

actionmailer (3.2.6)
actionpack (3.2.6)
activemodel (3.2.6)
activerecord (3.2.6)
activeresource (3.2.6)
activesupport (3.2.6)
arel (3.0.2)
builder (3.0.0)
bundler (1.1.5)
cgi_multipart_eof_fix (2.5.0)
coderay (1.0.7)
erubis (2.7.0)
fastercsv (1.5.5)
gem_plugin (0.2.3)
hike (1.2.1)
i18n (0.6.0, 0.4.2)
journey (1.0.4)
json (1.7.5)
mail (2.4.4)
metaclass (0.0.1)
mime-types (1.19)
mocha (0.12.3)
mongrel (1.1.5 x86-mingw32)
mongrel_service (0.3.4 i386-mswin32)
multi_json (1.3.6)
mysql (2.8.1 x86-mingw32)
net-ldap (0.3.1)
pg (0.14.0 x86-mingw32)
polyglot (0.3.3)
prototype-rails (3.2.1)
rack (1.4.1)
rack-cache (1.2)
rack-openid (1.3.1)
rack-ssl (1.3.2)
rack-test (0.6.1)
rails (3.2.6)
railties (3.2.6)
rake (0.9.2.2)
rdoc (3.12)
rmagick (2.12.0 mswin32)
ruby-openid (2.1.8)
sprockets (2.1.3)
thor (0.16.0)
tilt (1.3.3)
treetop (1.4.10)
tzinfo (0.3.33)
win32-service (0.5.2 mswin32)

But when I run bundle install . 但是当我运行bundle install时 It gives me this output. 它给了我这个输出。

Fetching gem metadata from http://rubygems.org/.......
Using rake (0.9.2.2) 
Using i18n (0.6.0) 
Using multi_json (1.3.6) 
Using activesupport (3.2.6) 
Using builder (3.0.0) 
Using activemodel (3.2.6) 
Using erubis (2.7.0) 
Using journey (1.0.4) 
Using rack (1.4.1) 
Using rack-cache (1.2) 
Using rack-test (0.6.1) 
Using hike (1.2.1) 
Using tilt (1.3.3) 
Using sprockets (2.1.3) 
Using actionpack (3.2.6) 
Using mime-types (1.19) 
Using polyglot (0.3.3) 
Using treetop (1.4.10) 
Using mail (2.4.4) 
Using actionmailer (3.2.6) 
Using arel (3.0.2) 
Using tzinfo (0.3.33) 
Using activerecord (3.2.6) 
Using activeresource (3.2.6) 
Using bundler (1.1.5) 
Using coderay (1.0.7) 
Using fastercsv (1.5.5) 
Using json (1.7.5) 
Using metaclass (0.0.1) 
Using mocha (0.12.3) 
Using mysql (2.8.1) 
Using net-ldap (0.3.1) 
Using pg (0.14.0) 
Using rack-ssl (1.3.2) 
Using rdoc (3.12) 
Using thor (0.16.0) 
Using railties (3.2.6) 
Using rails (3.2.6) 
Using prototype-rails (3.2.1) 
Using ruby-openid (2.1.8) 
Using rack-openid (1.3.1) 
Installing rmagick (2.13.1) with native extensions 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

C:/wamp/ruby/bin/ruby.exe extconf.rb 
checking for Ruby version >= 1.8.5... yes
Invalid drive specification.
Unable to get ImageMagick version
*** 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
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=C:/wamp/ruby/bin/ruby


Gem files will remain installed in C:/wamp/ruby/lib/ruby/gems/1.8/gems/rmagick-2.13.1 for inspection.
Results logged to C:/wamp/ruby/lib/ruby/gems/1.8/gems/rmagick-2.13.1/ext/RMagick/gem_make.out
An error occured while installing rmagick (2.13.1), and Bundler cannot continue.
Make sure that `gem install rmagick -v '2.13.1'` succeeds before bundling.

Note that I'm attempting to complete a redmine installation and need rmagick to continue using rake. 请注意,我正在尝试完成Redmine的安装,并且需要rmagick才能继续使用rake。

My ruby version is 1.8.7 and rubygem version is 1.3.7. 我的ruby版本是1.8.7,rubygem版本是1.3.7。 Thanks. 谢谢。

Update: 更新:

So after hearing that my existing rmagick was an old version I ran: 因此,在听到我现有的rmagick是旧版本后,我运行了:

gem uninstall rmagick

and successfully uninstalled my existing gem. 并成功卸载了我现有的gem。 After which I attempted a bundle install again which failed exactly the same as before. 之后,我再次尝试安装捆绑软件,但失败与以前完全相同。

This time however I went to my folder (C:\\wamp\\ruby\\lib\\ruby\\gems\\1.8\\gems\\rmagick-2.13.1) where it said the files would still be stored. 但是这一次我去了我的文件夹(C:\\ wamp \\ ruby​​ \\ lib \\ ruby​​ \\ gems \\ 1.8 \\ gems \\ rmagick-2.13.1),那里说文件仍然会被保存。 There I ran a new build via 在那里我通过运行了一个新版本

gem build rmagick.gemspec

The build succeeded so I think we're getting somewhere. 构建成功,所以我认为我们正在取得进展。 I ran: 我跑了:

gem install rmagick-2.13.1.gem --platform=ruby -- --with-opt-lib=c:\ImageMagick\6.3.5-Q8\lib --with-opt-include=c:\ImageMagick\6.3.5-Q8\include

and got this output ( note that I'm no longer getting Invalid Drive but this is otherwise identical to before ): 并得到以下输出( 请注意,我不再获得无效的驱动器,但这与之前相同 ):

checking for Ruby version >= 1.8.5... yes
Invalid drive specification.
Unable to get ImageMagick version
*** 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
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=C:/wamp/ruby/bin/ruby


Gem files will remain installed in C:/wamp/ruby/lib/ruby/gems/1.8/gems/rmagick-2.13.1 for inspection.
Results logged to C:/wamp/ruby/lib/ruby/gems/1.8/gems/rmagick-2.13.1/ext/RMagick/gem_make.out

So now I'm just working on why it can't determine the ImageMagick version... 所以现在我正在研究为什么它不能确定ImageMagick版本...

While this may not exactly answer the question... it's likely that as a novice user I borked my installation at some point. 尽管这可能无法完全回答问题...但是作为新手用户,我可能在某个时候使安装无聊。

Back-tracking and uninstalling everything that I had previously installed and then following the installation instructions again resolved the issue. 回溯和卸载我之前安装的所有内容,然后按照安装说明再次解决了该问题。

Note that this time around even in parts where it said, "although future versions should also work" I instead specified the exact versions that were mentioned in the article at the time of writing. 请注意,这次甚至是说“虽然将来的版本也可以使用”的部分,但我指定的是本文撰写时所提到的确切版本。

There is an old version of rmagick, though bundler try to install a newer version. 有一个旧版本的rmagick,尽管捆绑程序尝试安装一个新版本。 The build of the new version went something wrong. 新版本的构建出了点问题。 You should check the log file to find why. 您应该检查日志文件以查找原因。

ImageMagick is a native library, used by RMagick to manipulate images. ImageMagick是RMagick用来处理图像的本机库。 It seems something might be wrong with your ImageMagick installation, and RMagick is unable to detect the ImageMagick version installed on your environment. 您的ImageMagick安装似乎有问题,并且RMagick无法检测到您环境中安装的ImageMagick版本。

On the console, when you type 'identify', do you have the output of an application or just an file not found error? 在控制台上,当您键入“ identify”时,您是否有应用程序的输出或只是找不到文件错误?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM