无法安装cmake - 无法构建gem原生扩展

时间:2014-10-21 16:54:13

标签: ruby

我正在尝试安装cmakerugged宝石。我的Ruby是193,我的DevKit与此版本相对应。我修改了系统PATH并安装了DevKit。

现在我尝试运行gem install cmake,我收到错误:

> gem install cmake
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
ERROR:  Error installing cmake:
        ERROR: Failed to build gem native extension.

        C:/Ruby193/bin/ruby.exe extconf.rb
*** 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:/Ruby193/bin/ruby
extconf.rb:5:in `chdir': No such file or directory - C:/Ruby193/lib/ruby/gems/1.9.1/gems/
OENT)
        from extconf.rb:5:in `<main>'


Gem files will remain installed in C:/Ruby193/lib/ruby/gems/1.9.1/gems/cmake-2.8.7 for in
Results logged to C:/Ruby193/lib/ruby/gems/1.9.1/gems/cmake-2.8.7/ext/cmake/gem_make.out

我不知道该怎么做,我之前使用过较新的Ruby,问题也是如此。我该怎么办?

1 个答案:

答案 0 :(得分:0)

我通过下载installer安装它,然后通过UI安装。出于我的目的,我需要确保选中了将变量添加到PATH的框。