0

非常に混乱し、初めての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)

しかし、bundle installを実行すると. この出力が得られます。

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.

redmine のインストールを完了しようとしており、rake を使い続けるには rmagick が必要であることに注意してください。

私のルビーのバージョンは 1.8.7 で、ルビジェムのバージョンは 1.3.7 です。ありがとう。

アップデート:

したがって、既存のrmagickが古いバージョンであると聞いた後、次を実行しました。

gem uninstall rmagick

そして、既存の宝石を正常にアンインストールしました。その後、バンドルのインストールを再度試みましたが、以前とまったく同じように失敗しました。

ただし、今回は自分のフォルダー (C:\wamp\ruby\lib\ruby\gems\1.8\gems\rmagick-2.13.1) に移動しましたが、ファイルはまだ保存されていると言われています。そこで私は新しいビルドを実行しました

gem build rmagick.gemspec

ビルドは成功したので、どこかに到達していると思います。私は走った:

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

そして、この出力を得ました(無効なドライブを取得しなくなったことに注意してください。ただし、それ以外は以前と同じです):

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

だから今、私はImageMagickのバージョンを特定できない理由に取り組んでいます...

4

3 に答える 3

1

これは質問への正確な回答ではないかもしれませんが...初心者ユーザーとして、ある時点でインストールを中断した可能性があります。

以前にインストールしたものをすべてバックトラックしてアンインストールし、インストール手順に従って再度問題を解決しました。

今回は、「将来のバージョンも動作するはずですが」と述べた部分でも、執筆時点で記事に記載されていた正確なバージョンを指定したことに注意してください。

于 2012-08-25T21:27:29.390 に答える
0

rmagick には古いバージョンがありますが、バンドラーは新しいバージョンをインストールしようとします。新しいバージョンのビルドで問題が発生しました。理由を見つけるには、ログ ファイルを確認する必要があります。

于 2012-08-24T04:20:54.450 に答える
0

ImageMagick は、画像を操作するために RMagick によって使用されるネイティブ ライブラリです。ImageMagick のインストールに問題がある可能性があり、RMagick は環境にインストールされている ImageMagick のバージョンを検出できません。

コンソールで「identify」と入力すると、アプリケーションの出力が表示されますか、それとも単にファイルが見つからないというエラーが表示されますか?

于 2012-08-24T08:37:44.207 に答える