不会让我在Ruby提示符下安装Gem

sca*_*now 1 ruby windows gem install windows-vista

Windows Vista,Ruby v.3.3.5

C:\>gem install rmagick

Building native extensions.  This could take a while...

ERROR:  Error installing rmagick:
        ERROR: Failed to build gem native extension.

C:/Ruby19/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:/Ruby19/bin/ruby


Gem files will remain installed in C:/Ruby19/lib/ruby/gems/1.9.1/gems/rmagick-2.
12.2 for inspection.
Results logged to C:/Ruby19/lib/ruby/gems/1.9.1/gems/rmagick-2.12.2/ext/RMagick/
gem_make.out
Run Code Online (Sandbox Code Playgroud)

mop*_*oke 5

在Windows上,您应该使用rmagick-win32 gem.

http://rmagick.rubyforge.org/install-faq.html#win

  • 知道这一点+1.-1对于我们必须知道这种东西的世界:< (4认同)