14

コマンドを使用して、まったく新しいRailsプロジェクトを作成しました rails new qbc --database=mysql。すべてのファイルを完全に正常に作成しますが、バンドルのインストール時にエラーが発生します

$バンドルインストール
https://rubygems.org/..........からgemメタデータを取得しています。
https://rubygems.org/からgemメタデータを取得しています。
残念ながら、致命的なエラーが発生しました。Bundlerをご覧ください
http://bit.ly/bundler-issuesのトラブルシューティングドキュメント。ありがとう!
/ usr / bin / bundle:23:スタックレベルが深すぎます(SystemStackError)

gist.github.com/3956513

私はこの問題の解決策を検索して検索しましたが、それを経験した人は他にいないようです。私はCygwinで開発を行っていますが、それがCygwinと関係があるとしても驚かないでしょう。

空のディレクトリにソースと1つのgemだけを含むGemfileを作成しようとしましたが、バンドルインストールでも同じエラーが発生します。私はすべてのトラブルシューティング手順に従い、Cygwinとすべてのパッケージを再インストールしました。私の目を引き続けているのはFetching gem metadata2回です...バンドラーが何らかのループに巻き込まれている可能性はありますか?

4

3 に答える 3

20

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.
于 2013-02-09T19:11:22.097 に答える
1

残念ながら、この回答は意味をなさないため、役立つ可能性は低いと思いますが、次の方法で解決しました。

$ gem install rake
$ gem install bundler

$ bundle install

その時点で、同じエラーに遭遇することなく機能しました。

于 2013-01-24T03:13:40.923 に答える
0

Windows バイナリは、実行可能ヘッダーで優先スタック サイズをエンコードします。Cygwin バイナリのデフォルトは約 2M です。

これを変更できます:

peflags -x8192000 `which ruby`

「bundle install」を再実行します。しばらくの間、そのように私のために働いています。

于 2013-01-04T04:18:54.530 に答える