无法安装黄瓜宝石

时间:2015-03-10 01:50:28

标签: ruby rubygems cucumber

我正在尝试在我的Windows 7 PC上设置ruby / cucumber工具,我已经安装了Ruby 2.1.5和devkit并安装了除Cucumber之外的所有宝石。

我在安装黄瓜宝石时遇到以下错误。请帮我解决这个问题。

错误: 未安装以下宝石: cucumber(2.0.0.rc.4):安装黄瓜时出错: 错误:无法构建gem原生扩展。 C:/Ruby22-x64/bin/ruby.exe -r ./siteconf20150308-6692-1kwvlbm.rb extconf.rb在-lc中检查main()... * extconf.rb失败* 由于某些原因无法创建Makefile,可能缺少必要的库和/或标头。检查mkmf.log文件以获取更多详细信息。您可能需要配置选项。暂时增强PATH以包含DevKit ...提供的配置选项:构建本机扩展。这可能需要一段时间...... --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:/ Ruby22-x64 / bin / $(RUBY_BASE_NAME) - with-gherkin_lexer_ar-dir --without-gherkin_lexer_ar-dir --with-gherkin_lexer_ar-include --without-gherkin_lexer_ar-include = $ {gherkin_lexer_ar-dir} / include --with-gherkin_lexer_ar-lib --without-gherkin_lexer_ar-lib = $ {gherkin_lexer_ar-dir} / lib --with-clib --without-clib C:/ Ruby22-x64 / lib / ruby /2.2.0/mkmf.rb:456:in try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from C:/Ruby22-x64/lib/ruby/2.2.0/mkmf.rb:541:in try_link0'来自C:/Ruby22-x64/lib/ruby/2.2.0/mkmf.rb:556:in try_link' from C:/Ruby22-x64/lib/ruby/2.2.0/mkmf.rb:735:in try_func'from C:/Ruby22-x64/lib/ruby/2.2.0/mkmf.rb:966:在来自C:/Ruby22-x64/lib/ruby/2.2.0/mkmf.rb的checking_for'中的block in have_library' from C:/Ruby22-x64/lib/ruby/2.2.0/mkmf.rb:911:in块中:351:在block (2 levels) in postpone' from C:/Ruby22-x64/lib/ruby/2.2.0/mkmf.rb:321:in打开'来自C:/Ruby22-x64/lib/ruby/2.2.0/mkmf.rb:351:in block in postpone' from C:/Ruby22-x64/lib/ruby/2.2.0/mkmf.rb:321:in打开'来自C:/ Ruby22-x64 / lib /ruby/2.2.0/mkmf.rb:347:in postpone' from C:/Ruby22-x64/lib/ruby/2.2.0/mkmf.rb:910:in checking_for'来自C:/Ruby22-x64/lib/ruby/2.2.0/mkmf.rb:961:in have_library' from extconf.rb:5:in' extconf失败,退出代码1 Gem文件将保留在C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/gherkin-2.12.2中进行检查。结果记录到C:/Ruby22-x64/lib/ruby/gems/2.2.0/extensions/x64-mingw32/2.2.0/gherkin-2.12.2/gem_make.out

1 个答案:

答案 0 :(得分:0)

您是否可以尝试使用当前的HEAD?

你可以在Gemfile中指定gem'brancu',github:'cucumber / cucumber'并尝试bundle installl