2
votes

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

1
please help me I have tried so many things.. This works for a new rails app but it doesn't work for an existing source code.I used redmine source code for run rails.Tharindu Piyumantha

1 Answers

-1
votes

This worked for me:

brew install ImageMagick

gem install rmagick