“堆叠层太深”同时编译资产 [英] "stack level too deep" while compiling assets

查看:117
本文介绍了“堆叠层太深”同时编译资产的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在运行 brew升级或其他更新了我的gems / ruby​​版本,我的 rake资产:precompile 任务不再有效。

After running brew upgrade, or something else which updated my gems/ruby version, my rake assets:precompile task no longer works.

我得到这个错误:

I get this error:

rake aborted!
stack level too deep
  (in /Users/Jordan/Development/reejay/rails/reejay/app/assets/stylesheets/blog_player.css.scss)
/Users/Jordan/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:162
Tasks: TOP => assets:precompile:primary
rake aborted!
Command failed with status (1): [/usr/local/Cellar/ruby/1.9.3-p0/bin/ruby /...]
/usr/local/Cellar/ruby/1.9.3-p0/lib/ruby/1.9.1/rake/file_utils.rb:53:in `block in create_shell_runner'
/usr/local/Cellar/ruby/1.9.3-p0/lib/ruby/1.9.1/rake/file_utils.rb:45:in `call'
/usr/local/Cellar/ruby/1.9.3-p0/lib/ruby/1.9.1/rake/file_utils.rb:45:in `sh'
/usr/local/Cellar/ruby/1.9.3-p0/lib/ruby/1.9.1/rake/file_utils_ext.rb:39:in `sh'
/usr/local/Cellar/ruby/1.9.3-p0/lib/ruby/1.9.1/rake/file_utils.rb:80:in `ruby'
/usr/local/Cellar/ruby/1.9.3-p0/lib/ruby/1.9.1/rake/file_utils_ext.rb:39:in `ruby'
/Users/Jordan/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.1/lib/sprockets/assets.rake:9:in `ruby_rake_task'
/Users/Jordan/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.1/lib/sprockets/assets.rake:17:in `invoke_or_reboot_rake_task'
/Users/Jordan/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.1/lib/sprockets/assets.rake:25:in `block (2 levels) in <top (required)>'
/usr/local/Cellar/ruby/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:205:in `call'
/usr/local/Cellar/ruby/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:205:in `block in execute'
/usr/local/Cellar/ruby/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:200:in `each'
/usr/local/Cellar/ruby/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:200:in `execute'
/usr/local/Cellar/ruby/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:158:in `block in invoke_with_call_chain'
/usr/local/Cellar/ruby/1.9.3-p0/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/usr/local/Cellar/ruby/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:151:in `invoke_with_call_chain'
/usr/local/Cellar/ruby/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:144:in `invoke'
/usr/local/Cellar/ruby/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:116:in `invoke_task'
/usr/local/Cellar/ruby/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:94:in `block (2 levels) in top_level'
/usr/local/Cellar/ruby/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:94:in `each'
/usr/local/Cellar/ruby/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:94:in `block in top_level'
/usr/local/Cellar/ruby/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:133:in `standard_exception_handling'
/usr/local/Cellar/ruby/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:88:in `top_level'
/usr/local/Cellar/ruby/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:66:in `block in run'
/usr/local/Cellar/ruby/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:133:in `standard_exception_handling'
/usr/local/Cellar/ruby/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:63:in `run'
/usr/local/bin/rake:32:in `<main>'
Tasks: TOP => assets:precompile

以下是我的Gemfile的链接: http://www.pastie.org/3019470

Here is a link to my Gemfile: http://www.pastie.org/3019470

其他rake任务,如db:迁移,继续按预期工作。这只会影响资源:预编译任务。

Other rake tasks, like db:migrate, continue to work as expected. This only affects the assets:precompile task.

推荐答案

对于那些还没有使用它的人来说:rvm,rvm,rvm。学习它,喜欢它。)

(Repeating my comment from above, since it appears to have actually been the correct answer. For anyone who does not already use it: rvm, rvm, rvm. Learn it, love it.)

有些东西很奇怪引用三个不同版本的ruby(1.9.1,1.9.2和1.9.3)的堆栈跟踪。我建议安装 rvm ,创建一个干净的宝石,然后重试。

There's something very strange with a stack trace that references three different versions of ruby (1.9.1, 1.9.2, and 1.9.3). I would recommend installing rvm, creating a clean gemset, and trying this again.

这篇关于“堆叠层太深”同时编译资产的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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