Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/windows/15.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 Windows上的libgit2可能存在坚固的gem安装问题_Ruby_Windows_Gem - Fatal编程技术网

Ruby Windows上的libgit2可能存在坚固的gem安装问题

Ruby Windows上的libgit2可能存在坚固的gem安装问题,ruby,windows,gem,Ruby,Windows,Gem,我正在使用Windows,我的Gemfile有以下行: gem 'rugged' 当我运行bundle install时,会出现以下错误: Installing rugged 0.21.0 with native extensions Gem::Ext::BuildError: ERROR: Failed to build gem native extension. C:/Ruby21/bin/ruby.exe extconf.rb --use-system-libraries

我正在使用Windows,我的
Gemfile
有以下行:

gem 'rugged'
当我运行
bundle install
时,会出现以下错误:

Installing rugged 0.21.0 with native extensions

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

    C:/Ruby21/bin/ruby.exe extconf.rb --use-system-libraries
    checking for cmake... no 
    ERROR: CMake is required to build Rugged.

*** 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:/Ruby21/bin/ruby

extconf failed, exit code 1

Gem files will remain installed in
C:/Ruby21/lib/ruby/gems/2.1.0/gems/rugged-0.21.0 for inspection.
Results logged to C:/Ruby21/lib/ruby/gems/2.1.0/extensions/x86-mingw32/2.1.0/rugged-0.21.0/gem_make.out

An error occurred while installing rugged(0.21.0), and Bundler cannot continue.

Make sure that `gem install rugged -v '0.21.0'` succeeds before
bundling.

我猜它与libgit2有关,但我不确定。

这实际上是一个问题,我很惊讶没有人问得更多。但是
rucked
需要
CMake
pkg config
才能正确编译

因为我们可以,我们将把它们提取到DevKit本身中

首先让我们各拿一份:

CMake
相当直截了当,。
pkg-config
有点复杂,它有一些依赖关系等等。然而,有一个问题

然后将适当的文件提取到DevKit中

一旦拥有它们,您需要打开每个存档()并打开存档中的顶级文件夹。
从那里,您需要将
bin
share
目录从归档文件提取到DevKit根目录中。
它应该只是将目录合并到现有目录中,不应该覆盖或删除任何内容


再次尝试安装,它应该正常运行并且你不会因为更多的东西而弄脏你的
路径。

谢谢你,伙计……现在我遇到了一个新问题。这与windows pc上的libv8和rubyracer有关。这个问题应该在这里的某个地方得到解答,如果不是的话,请再问一个问题。谢谢你,老兄……现在我遇到了一个新的问题……这与windows pc上的libv8和rubyracer有关。人们说了很多类似的话,等等。但它们似乎不起作用。我尝试先运行C:\Sooraj\playdone\playdone master>gem install libv8-v'3.16.14.3'--with-system-v8,然后在执行以下捆绑安装时出现错误