简体   繁体   中英

Gem::Ext::BuildError: ERROR: Failed to build gem native extension. - tharindu

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

C:/RailsInstaller/Ruby2.1.0/bin/ruby.exe extconf.rb

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:/RailsInstaller/Ruby2.1.0/bin/ruby

extconf failed, exit code 1

Gem files will remain installed in C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1 .0/gems/rmagick-2.15.2 for inspection. Results logged to C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/extensions/x86 -mingw32/2.1.0/rmagick-2.15.2/gem_make.out An error occurred while installing rmagick (2.15.2), and Bundler cannot continue. Make sure that gem install rmagick -v '2.15.2' succeeds before bundling.

E:\\redmine-master\\bin>gem install rmagick -v '2.15.2' 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.1.0/bin/ruby.exe extconf.rb

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:/RailsInstaller/Ruby2.1.0/bin/ruby

extconf failed, exit code 1

Gem files will remain installed in C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1 .0/gems/rmagick-2.15.2 for inspection. Results logged to C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/extensions/x86 -mingw32/2.1.0/rmagick-2.15.2/gem_make.out

This worked for me:

brew install ImageMagick

gem install rmagick

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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