0

I'm trying to precompile my app assets locally. When I run

bundle exec rake assets:precompile --trace

I get a stack level too deep error:

** 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

What's changed since assets:precompile worked: I moved from ruby 1.9.2 to 1.9.3. Not understanding why it says it's failing on a stylesheet. Any ideas what might be wrong?

Kori John Roys
  • 2,621
  • 1
  • 19
  • 27
  • Hmm, have you tried `bundle update rake`? I might even recommend a `bundle update` unless you have specific version dependencies. – Noz Dec 28 '12 at 23:20
  • @CyleHunter: 10.0.3 is the newest. Also, it means that Rails are more less recent because they always depend on particular version of rake. – skalee Dec 28 '12 at 23:24
  • @KoriJohnRoys: p194 is outdated by few patchlevels. What happens on 1.9.3p327? – skalee Dec 28 '12 at 23:26
  • Suppose I should add that I'm on Rails 3.1.1. And yes I've run `bundle update`. – Kori John Roys Dec 28 '12 at 23:27
  • @KoriJohnRoys: 3.1.1 is really old and this might be the problem. Try updating to newest 3.1.x while being still on 1.9.2, check it, then try moving to 1.9.3 again. Good chance that it helps. – skalee Dec 28 '12 at 23:30
  • Tried it with 1.9.3p327. Same issue. Going to try going back to 1.9.2 after gcc downloads. – Kori John Roys Dec 29 '12 at 00:32

1 Answers1

0

Finally figured out the right thing to Google: "scss stack level too deep". Turns out it's a sass issue per this SO: "rake aborted! stack level too deep" while deploying to Heroku

TL;DR:

I had this in my Gemfile:

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

Needed this:

gem 'sass-rails', '3.1.4'
Community
  • 1
  • 1
Kori John Roys
  • 2,621
  • 1
  • 19
  • 27