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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With