首次捆绑安装,堆栈级别太深 [英] First ever bundle install, stack level too deep

查看:24
本文介绍了首次捆绑安装,堆栈级别太深的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用命令创建了一个全新的 rails 项目rails new qbc --database=mysql.它可以完美地创建所有文件,但是在捆绑安装时出错

<上一页>$捆绑安装从 https://rubygems.org/获取 gem 元数据............从 https://rubygems.org/.. 获取 gem 元数据不幸的是,发生了致命错误.请参阅捆绑器http://bit.ly/bundler-issues 上的故障排除文档.谢谢!/usr/bin/bundle:23: 堆栈级别太深 (SystemStackError)

gist.github.com/3956513

我已经搜索并搜索了此问题的解决方案,但我似乎无法找其他经历过的人.我正在 Cygwin 上开发,我如果这与它有关,我不会感到惊讶.

我尝试创建一个 Gemfile,其中只有源和一个 gemdirectory 和 bundle install 仍然给出相同的错误.我已经关注了所有故障排除步骤,重新安装 Cygwin 和所有软件包,一切.什么一直吸引我的是 Fetching gem metadata 两次...有没有可能bundler 陷入了某种循环?

解决方案

Cygwin 的 pthread_attr_getstack 默认报告大约 90k.我认为 Cygwin 报告的是 committed(已使用)堆栈大小,而不是 reserved(总可用)大小.然后 Ruby 将其(即 90k)视为有史以来的最大堆栈大小.

要更改初始提交堆栈大小:

peflags -X409600 `which ruby​​`

注意大写的 -X.小写 -x 更改保留的堆栈大小,而不是最初提交的堆栈空间.

这为我解决了所有 Ruby+Rails+Cygwin 问题.

我不太了解 Ruby 或 Cygwin 的内部结构,无法知道哪个是正确的修复方法,但它可能是其中之一.

  • Cygwin 从 pthread_attr_getstack 报告保留堆栈大小.
  • Ruby 添加了一个构建步骤来运行上面的 peflags 命令.
  • Ruby 以不同的方式确定可用堆栈空间.

I have created a brand new rails project using the command rails new qbc --database=mysql. It creates all the files perfectly fine, but at the bundle install it errors out

$ bundle install
Fetching gem metadata from https://rubygems.org/...........
Fetching gem metadata from https://rubygems.org/..
Unfortunately, a fatal error has occurred. Please see the Bundler
troubleshooting documentation at http://bit.ly/bundler-issues. Thanks!
/usr/bin/bundle:23: stack level too deep (SystemStackError)

gist.github.com/3956513

I have searched and searched for the solution to this issue but I can't seem to find anyone else who has experienced it. I am developing on Cygwin and I wouldn't be surprised if that has something to do with it.

I tried creating a Gemfile with just the source and one gem in it in an empty directory and bundle install still gives the same error. I have followed all of the troubleshooting steps, reinstalled Cygwin and all packages, everything. What keeps catching my eye is the Fetching gem metadata twice...is it possible that bundler is caught in some kind of loop?

解决方案

Cygwin's pthread_attr_getstack reports about 90k by default. I think Cygwin is reporting the committed (used-so-far) stack size, not the reserved (total available) size. Then Ruby is treating that (i.e. 90k) as the maximum stack size ever.

To change the initial committed stack size:

peflags -X409600 `which ruby`

Note the capitalized -X. Lowercase -x changes reserved stack size, not initially-committed stack space.

This fixes all Ruby+Rails+Cygwin issues for me.

I don't know Ruby or Cygwin internals well enough to know which is the right fix, but it's probably one of these.

  • Cygwin reports reserved stack size from pthread_attr_getstack.
  • Ruby adds a build step to run the peflags command above.
  • Ruby determines the available stack space a different way.

这篇关于首次捆绑安装,堆栈级别太深的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆