rake资产:在ruby 1.9.2之后预编译失败 - > 1.9.3升级

时间:2012-12-28 23:05:47

标签: ruby-on-rails asset-pipeline precompile

我正在尝试在本地预编译我的应用资源。我跑的时候

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工作以来发生了什么变化:我从红宝石1.9.2迁移到1.9.3。不明白为什么它说它在样式表上失败了。什么想法可能是错的?

1 个答案:

答案 0 :(得分:0)

最后向谷歌找出正确的事情:“scss stack level too deep”。结果证明这是一个问题:"rake aborted! stack level too deep" while deploying to Heroku

TL; DR:

我在我的Gemfile中有这个:

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

需要这个:

gem 'sass-rails', '3.1.4'