2

I'm upgrading an application from Rails 3.0 to Rails 3.1. The tests run ok, as the unicorn server. However, when I run any rake task (being 'rake routes' or even 'rake about'), it returns 'stack level too deep'. This doesn't happen using Rails 3.0.20.

I've tracked down the Rails stack, requiring the libraries individually, and the error happens when I require ActiveRecord or ActionController.

I've tried different versions of Rails (from 3.1.0 until 3.2.11), different versions of rake (0.8.7, 0.9.2, 10.0.3), different versions of bundler (1.1.5 and 1.2.3) and the result is the same. I always use with 'bundle exec', and tried using binstubs ('bin/rake').

I'm still not using the asset pipeline, so no sass-rails issue.

I'm using RVM under OS X Mountain Lion and also reinstalled ruby 1.9.3-p374. I've even used Ubuntu under Vagrant, same results.

Did anyone have the same problem?

4

1 に答える 1

3

問題が見つかりました:一部のタスクにはActionView::Helpers(たとえば、number_to_currencyを使用するために)含まれています。これが、スタックレベルのエラーが深すぎる原因です。

これは、新しいアプリと。を使用して単一の.rakeファイルを作成する場合にも発生しますinclude ActionView::Helpers。それについてRubyonRailsで問題を開きます。

于 2013-02-15T16:57:34.717 に答える