简体   繁体   English

构建gem的本机扩展时出错(extconf.rb)

[英]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: 因此,我已经在Windows上开发Rails应用程序已有一段时间了,每当我尝试安装某些gem时,都会出现一个问题:

$ 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. 每当我尝试安装需要本机扩展的gem时,经常会出现此错误。 The RubyInstaller wiki documents a very similar problem on their troubleshooting page , but I the solution proposed there didn't work for me. RubyInstaller Wiki在其疑难解答页面上记录了一个非常类似的问题,但是我提出的解决方案对我而言不起作用。 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. 因此,当其他gem出现相同的错误时,在RubyInstaller情况下修复错误的建议可能不会有所帮助。

Best way to go about it would be to google for this error message along with the gem name. 最好的解决方法是在Google搜寻此错误消息以及gem名称。

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 在Google上搜索“无法构建gem本机扩展capybara webkit失败” ,gem repo上的以下链接似乎具有解决此错误的答案: https : //github.com/thoughtbot/capybara-webkit/issues / 77

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 extconf.rb:“无法构建本地gem扩展” - extconf.rb: “fails to build native gem extension” 无法构建gem native扩展 - 找不到extconf.rb - Failed to build gem native extension - extconf.rb not found 安装Rails时出现“extconf.rb failed”消息 - “extconf.rb failed” message while installing Rails 安装 pg gem 时出错 -- extconf.rb 失败 - Error installing pg gem -- extconf.rb failed “安装导轨时出错”,因为 Ubuntu 18.04 上的“extconf.rb 失败” - "Error installing rails" because "extconf.rb failed" on Ubuntu 18.04 无法安装Rails extconf.rb失败 - Unable to install Rails extconf.rb failed extconf.rb失败(Ruby On Rails) - extconf.rb failed (Ruby On Rails) 错误 extconf.rb:42:in `popen&#39;: No such file or directory - /usr/pgsql-9.1/bin/pg_config (Errno::ENOENT) from extconf.rb:42:in `<main> &#39; - Error extconf.rb:42:in `popen': No such file or directory - /usr/pgsql-9.1/bin/pg_config (Errno::ENOENT) from extconf.rb:42:in `<main>' Capistrano 3错误-extconf.rb:29:in <main> &#39;:“ libxml2”软件包不可用。 (RuntimeError) - Capistrano 3 error - extconf.rb:29:in `<main>': The “libxml2” package isn't available. (RuntimeError) Gem Rmagick安装错误:extconf.rb:171:在``':没有这样的文件或目录 - convert -version(Errno :: ENOE NT) - Gem Rmagick install error: extconf.rb:171:in ``': No such file or directory - convert -version (Errno::ENOE NT)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM