【问题标题】:Error while gem install rails in Windows 10在 Windows 10 中 gem 安装 rails 时出错
【发布时间】:2017-06-29 03:25:14
【问题描述】:

你能解释一下我应该怎么做吗?我已经添加了 ruby​​gems.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。本地!

【问题讨论】:

    标签: ruby-on-rails windows rubygems


    【解决方案1】:

    这不是 rails 或 ruby​​gems.org 的问题。它与github有关。您使用的是旧版本的 git。

    Here is solution for this.

    您也可以查看解释here

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

    current Cygwinnew version of MSYS - MSYS2 - 已经有不同的逻辑,希望更健壮。只有旧版本的 Windows 版 Git 仍然使用旧的损坏的 MSYS 系统构建。

    分辨率:

    安装Git for Windows 2 - 它是用新的properly maintained MSYS2 构建的,还具有许多新功能、大量错误修复等。还有一个可用的 64 位版本,即使这个问题没有得到解决,它也会大大降低地址空间冲突的可能性。 (信息)如果您使用的是嵌入式 Git,则需要通过导航到工具>选项>Git(Tab)>Git 版本>使用系统 Git 来更改 SourceTree 的 Git 设置以使用系统 Git

    【讨论】:

      猜你喜欢
      • 2017-12-17
      • 2019-03-26
      • 2017-02-20
      • 2021-08-18
      • 2023-03-19
      • 1970-01-01
      • 2013-10-17
      • 2021-06-22
      • 2014-09-04
      相关资源
      最近更新 更多