在Windows 10中安装gem时出错

时间:2017-06-29 03:25:15

标签: ruby-on-rails windows rubygems

你能解释一下我应该怎么做吗?我已经完成了添加rubygems.org和gem update --system

的来源
C:\Ruby22>gem install rails
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
C:\Ruby22\devkit\bin\make.exe: *** Couldn't reserve space for cygwin's heap, 
Win32 error 0
C:\Ruby22\devkit\bin\make.exe: *** Couldn't reserve space for cygwin's heap, 
Win32 error 0
ERROR:  Error installing rails:
    ERROR: Failed to build gem native extension.

C:/Ruby22/bin/ruby.exe extconf.rb
creating Makefile

make "DESTDIR=" clean
  0 [main] us 0 init_cheap: VirtualAlloc pointer is null, Win32 error 487
AllocationBase 0x0, BaseAddress 0x60E90000, RegionSize 0x390000, State 0x10000
C:\Ruby22\devkit\bin\make.exe: *** Couldn't reserve space for cygwin's heap, Win32 error 0

make "DESTDIR="
  0 [main] us 0 init_cheap: VirtualAlloc pointer is null, Win32 error 487
AllocationBase 0x0, BaseAddress 0x60E90000, RegionSize 0x390000, State 0x10000
C:\Ruby22\devkit\bin\make.exe: *** Couldn't reserve space for cygwin's heap, Win32 error 0

make failed, exit code 1

Gem files will remain installed in 
C:/Ruby22/lib/ruby/gems/2.2.0/gems/websocket-driver-0.6.5 for inspection.
Results logged to C:/Ruby22/lib/ruby/gems/2.2.0/extensions/x86-mingw32/2.2.0/websocket-driver-0.6.5/gem_make.out

我真的想从c9中解脱出来。 Locaaall !!

1 个答案:

答案 0 :(得分:0)

这不是rails或rubygems.org的问题。它与github有关。您正在使用旧版本的git。

Here is solution for this.

您也可以查看解释here

上面链接中的复制解决方案:

current Cygwinnew version of MSYS - MSYS2 - 已经有不同的逻辑,希望更强大。它只是旧版本的Git for Windows,它仍然使用旧的MSYS系统构建。

分辨率:

安装Git for Windows 2 - 它是使用新的properly maintained MSYS2构建的,还有许多新功能,大量的错误修复等等。还有一个64位版本可以降低地址空间冲突的可能性,即使这个问题没有得到解决。 (info)如果您正在使用Embedded Git,则需要通过导航到工具>选项> Git(Tab)> Git版本>使用System Git