在安装Windows计算机上的ruby gems时出现`install bundler`错误 [英] error in `install bundler` while installing ruby gems on windows machine

查看:181
本文介绍了在安装Windows计算机上的ruby gems时出现`install bundler`错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在努力修补中间人 - 一个使用红宝石宝石的静态网站生成器。它能够构建所有本地扩展,但不能使用wdm。当我在命令提示符下运行 install bundler 命令时,我收到下面的错误消息。

I am trying to intsall middleman - a static site generator, which uses ruby gems. It is able to build all native extensions but not wdm. I am getting the below error message when I run install bundler command in my command prompt.

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

                C:/Ruby200/bin/ruby.exe -r ./siteconf20140814-4200-t0fvuf.rb extconf.rb
            checking for main() in -lkernel32... *** 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:/Ruby200/bin/ruby
                    --with-kernel32lib
                    --without-kernel32lib
            C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:434:in `try_do': The compiler failed to genera
            te an executable file. (RuntimeError)
            You have to install development tools first.
                    from C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:519:in `try_link0'
                    from C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:534:in `try_link'
                    from C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:720:in `try_func'
                    from C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:950:in `block in have_library'
                    from C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:895:in `block in checking_for'
                    from C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:340:in `block (2 levels) in postp
            one'
                    from C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:310:in `open'
                    from C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:340:in `block in postpone'
                    from C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:310:in `open'
                    from C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:336:in `postpone'
                    from C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:894:in `checking_for'
                    from C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:945:in `have_library'
                    from extconf.rb:19:in `<main>'

            extconf failed, exit code 1

            Gem files will remain installed in C:/Ruby200/lib/ruby/gems/2.0.0/gems/wdm-0.1.0
             for inspection.
            Results logged to C:/Ruby200/lib/ruby/gems/2.0.0/extensions/x86-mingw32/2.0.0/wd
            m-0.1.0/gem_make.out
            An error occurred while installing wdm (0.1.0), and Bundler cannot continue.
            Make sure that `gem install wdm -v '0.1.0'` succeeds before bundling.

我需要在运行之前安装一些东西。

Do I need to install something before running it.

推荐答案

实际上,答案在日志中。使软件包安装失败的gemwdm需要安装开发工具。

The answer is in the logs actually. the gem "wdm" which makes the bundle install fail requires the "development tools" to be installed.

您可以按照以下说明安装它们:

You can install those by following the instructions there.

这篇关于在安装Windows计算机上的ruby gems时出现`install bundler`错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆