简体   繁体   中英

Error while building native extensions for gems (extconf.rb)

So, I've been developing a Rails app on Windows for quite a while now, and there's one problem that keeps coming up whenever I try to install certain gems:

$ gem install capybara-webkit-0.12.1.gem
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
ERROR:  Error installing capybara-webkit-0.12.1.gem:
        ERROR: Failed to build gem native extension.

        c:/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf.rb


Gem files will remain installed in c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/capybara-webkit-0.12.1 for inspection.
Results logged to c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/capybara-webkit-0.12.1/./gem_make.out

This error turns up frequently whenever I am trying to install a gem that requires native extensions. The RubyInstaller wiki documents a very similar problem on their troubleshooting page , but I the solution proposed there didn't work for me. Any help you can give me would be appreciated. =)

"Failed to build gem native extension." error message while installing a gem is specific to each gem, and not necessarily common across gems. Hence the suggestions for fixing the error in the case of RubyInstaller won't likely help when the same error comes up for other gems.

Best way to go about it would be to google for this error message along with the gem name.

Searching for "Failed to build gem native extension capybara webkit" on Google , the following link on the gem repo seems to have the answer as to how to fix this error: https://github.com/thoughtbot/capybara-webkit/issues/77

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