Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/67.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 在windows计算机上安装ruby gems时,`install bundler`中出错_Ruby On Rails_Ruby_Gem_Middleman - Fatal编程技术网

Ruby on rails 在windows计算机上安装ruby gems时,`install bundler`中出错

Ruby on rails 在windows计算机上安装ruby gems时,`install bundler`中出错,ruby-on-rails,ruby,gem,middleman,Ruby On Rails,Ruby,Gem,Middleman,我正在尝试导入所有middleman-一个静态站点生成器,它使用ruby gems。它能够构建所有本机扩展,但不能构建wdm。在命令提示符下运行install bundler命令时,我收到以下错误消息 Gem::Ext::BuildError: ERROR: Failed to build gem native extension. C:/Ruby200/bin/ruby.exe -r ./siteconf20140814-42

我正在尝试导入所有middleman-一个静态站点生成器,它使用ruby gems。它能够构建所有本机扩展,但不能构建wdm。在命令提示符下运行
install bundler
命令时,我收到以下错误消息

                 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.
Gem::Ext::BuildError:错误:无法生成Gem本机扩展。
C:/Ruby200/bin/ruby.exe-r./siteconf20140814-4200-t0fvuf.rb extconf.rb
正在检查-lkernel32…***中的main()extconf.rb失败***
由于某些原因无法创建Makefile,可能缺少必要的
库和/或标题。有关详细信息,请查看mkmf.log文件。你可以
需要配置选项。
提供的配置选项:
--使用opt dir
--不带opt dir
--选择包含
--不带opt include=${opt dir}/include
--使用opt lib
--不带opt lib=${opt dir}/lib
--用make prog
--没有make prog
--srcdir=。
--库尔迪尔
--ruby=C:/Ruby200/bin/ruby
--with-kernel32lib
--无核32lib
C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:434:在“try_-do”中:编译器无法编译
生成一个可执行文件。(运行时错误)
您必须首先安装开发工具。
from C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:519:in'try\u 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_'
from C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:340:in`block(两级)中的post
某人的
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 delay'
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“推迟”
from C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:894:in'checking_'
从C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:945:in'have_library'
来自extconf.rb:19:in`'
extconf失败,退出代码1
Gem文件仍将安装在C:/Ruby200/lib/ruby/gems/2.0.0/gems/wdm-0.1.0中
供检查。
结果记录到C:/Ruby200/lib/ruby/gems/2.0.0/extensions/x86-mingw32/2.0.0/wd
m-0.1.0/gem_make.out
安装wdm(0.1.0)时出错,捆绑程序无法继续。
在绑定之前,请确保'gem install wdm-v'0.1.0'成功。

在运行它之前,我是否需要安装一些东西。

答案实际上在日志中。使捆绑包安装失败的gem“wdm”要求安装“开发工具”


您可以按照说明进行安装。

我已经安装了开发工具包。ruby dk.rb安装。我是否需要在路径中添加一些东西以使其工作。