rake aborted! stack level too deep [duplicate]

天大地大妈咪最大 提交于 2019-11-30 12:11:59

try placing bundle exec in front of the rake command.

bundle exec rake -T

You need to update your gem. I met this error with gem '1.8.10', and fixed by upgrading to 1.8.16

gem update --system

I only had this problem with ruby-1.9.2-p180 via rvm.

Switching to ruby-1.9.2-p0 fixed the problem. try "rvm use 1.9.2-p0"

The stack of the calls can depend on the gems you install (some gems monkeypatch the rails tasks) which explains why you would encounter this on a specific app and not on others.

On a unix system you could try using the ulimit command to increase your stack size. On the windows side I haven't found a solution yet.

Depending on which release of ruby you use on windows you may want to ask the maintainers how to increase the stack.

For ruby installer you will need to install the mingw compile environment, clone the github repository and recompile the ruby you use (not very sexy I admit).

Tobias Cohen

I just encountered this exact error message on Ubuntu, and was able to solve it by downgrading rubygems from 1.8.3 to 1.7.1.

There is nice post by Yehuda Katz that explains why without bundle exec there can be version conflicts: http://yehudakatz.com/2011/05/30/gem-versioning-and-bundler-doing-it-right/

There is also bundle install --binstubs command that allows to version-safely run rake db:reset like this: bin/rake db:reset.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!