0

我正在尝试在本地预编译我的应用程序资产。当我跑

bundle exec rake assets:precompile --trace

我得到一个堆栈级别太深的错误:

** Invoke assets:precompile (first_time)
** Execute assets:precompile
/Users/koriroys/.rbenv/versions/1.9.3-p194/bin/ruby /Users/koriroys/.rbenv/versions/1.9.3-p194/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets --trace
** Invoke assets:precompile:all (first_time)
** Execute assets:precompile:all
** Invoke assets:precompile:primary (first_time)
** Invoke assets:environment (first_time)
** Execute assets:environment
** Invoke tmp:cache:clear (first_time)
** Execute tmp:cache:clear
** Execute assets:precompile:primary
rake aborted!
stack level too deep
  (in /Users/koriroys/source/side_projects/test_app/app/assets/stylesheets/favorites.css.scss)
/Users/koriroys/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rake-10.0.3/lib/rake/task.rb:170
Tasks: TOP => assets:precompile:primary
rake aborted!
Command failed with status (1): [/Users/koriroys/.rbenv/versions/1.9.3-p194...]
/Users/koriroys/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rake-10.0.3/lib/rake/file_utils.rb:53:in `block in create_shell_runner'
/Users/koriroys/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rake-10.0.3/lib/rake/file_utils.rb:45:in `call'
/Users/koriroys/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rake-10.0.3/lib/rake/file_utils.rb:45:in `sh'
/Users/koriroys/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rake-10.0.3/lib/rake/file_utils_ext.rb:40:in `sh'
/Users/koriroys/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rake-10.0.3/lib/rake/file_utils.rb:80:in `ruby'
/Users/koriroys/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rake-10.0.3/lib/rake/file_utils_ext.rb:40:in `ruby'
/Users/koriroys/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/actionpack-3.1.1/lib/sprockets/assets.rake:9:in `ruby_rake_task'
/Users/koriroys/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/actionpack-3.1.1/lib/sprockets/assets.rake:17:in `invoke_or_reboot_rake_task'
/Users/koriroys/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/actionpack-3.1.1/lib/sprockets/assets.rake:25:in `block (2 levels) in <top (required)>'
/Users/koriroys/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rake-10.0.3/lib/rake/task.rb:228:in `call'
/Users/koriroys/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rake-10.0.3/lib/rake/task.rb:228:in `block in execute'
/Users/koriroys/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rake-10.0.3/lib/rake/task.rb:223:in `each'
/Users/koriroys/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rake-10.0.3/lib/rake/task.rb:223:in `execute'
/Users/koriroys/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rake-10.0.3/lib/rake/task.rb:166:in `block in invoke_with_call_chain'
/Users/koriroys/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/Users/koriroys/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rake-10.0.3/lib/rake/task.rb:159:in `invoke_with_call_chain'
/Users/koriroys/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rake-10.0.3/lib/rake/task.rb:152:in `invoke'
/Users/koriroys/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:143:in `invoke_task'
/Users/koriroys/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:101:in `block (2 levels) in top_level'
/Users/koriroys/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:101:in `each'
/Users/koriroys/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:101:in `block in top_level'
/Users/koriroys/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:110:in `run_with_threads'
/Users/koriroys/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:95:in `top_level'
/Users/koriroys/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:73:in `block in run'
/Users/koriroys/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:160:in `standard_exception_handling'
/Users/koriroys/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:70:in `run'
/Users/koriroys/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rake-10.0.3/bin/rake:33:in `<top (required)>'
/Users/koriroys/.rbenv/versions/1.9.3-p194/bin/rake:23:in `load'
/Users/koriroys/.rbenv/versions/1.9.3-p194/bin/rake:23:in `<main>'
Tasks: TOP => assets:precompile

自工作以来发生了什么变化assets:precompile:我从 ruby​​ 1.9.2 迁移到 1.9.3。不明白为什么它说它在样式表上失败了。有什么想法可能是错的吗?

4

1 回答 1

0

终于找到了谷歌正确的事情:“scss stack level too deep”。事实证明,根据这个 SO,这是一个 sass 问题:“rake aborted!stack level too deep” while deploying to Heroku

TL;博士:

我的 Gemfile 中有这个:

gem 'sass-rails', '~> 3.1.4'

需要这个:

gem 'sass-rails', '3.1.4'
于 2012-12-29T01:01:15.947 回答