2014-10-17 86 views
4

這裏是跟蹤輸出:這是什麼:can't dump anonymous class東西?不知道我還能嘗試什麼。我真的很歡迎你的幫助。謝謝!!Heroku運行rake資產:預編譯失敗? (不能轉儲匿名類)

heroku run rake assets:precompile --trace 
Running `rake assets:precompile --trace` attached to terminal... up, run.1662 
** Invoke assets:precompile (first_time) 
** Invoke assets:environment (first_time) 
** Execute assets:environment 
** Invoke environment (first_time) 
** Execute environment 
** Execute assets:precompile 
I, [2014-10-17T01:54:29.696549 #2] INFO -- : Writing /app/public/assets/10code-7079b1d91d9d7c7a9a2338cea73f8a82.jpg 
I, [2014-10-17T01:54:29.698443 #2] INFO -- : Writing /app/public/assets/favicon-a74691afc8a111f00d70667670a61182.ico 
I, [2014-10-17T01:54:37.258312 #2] INFO -- : Writing /app/public/assets/application-16c68220ab8dd6d871a35138ee0901f0.js 
Warning. Error encountered while saving cache 377616f718d2970e646cd030c1890fad19bd5c36/about.css.scssc: can't dump anonymous class #<Class:0x007f7cefb6b200> 

Warning. Error encountered while saving cache 377616f718d2970e646cd030c1890fad19bd5c36/blog.css.scssc: can't dump anonymous class #<Class:0x007f7cefb6b200> 

Warning. Error encountered while saving cache 377616f718d2970e646cd030c1890fad19bd5c36/contact.css.scssc: can't dump anonymous class #<Class:0x007f7cefb6b200> 

Warning. Error encountered while saving cache 302a764321a9d0728b3e071c26d4a8996eeed852/footer.css.scssc: can't dump anonymous class #<Class:0x007f7cefb6b200> 

Warning. Error encountered while saving cache 302a764321a9d0728b3e071c26d4a8996eeed852/navigation.css.scssc: can't dump anonymous class #<Class:0x007f7cefb6b200> 

Warning. Error encountered while saving cache 377616f718d2970e646cd030c1890fad19bd5c36/portfolio.css.scssc: can't dump anonymous class #<Class:0x007f7cefb6b200> 

Warning. Error encountered while saving cache 377616f718d2970e646cd030c1890fad19bd5c36/resources.css.scssc: can't dump anonymous class #<Class:0x007f7cefb6b200> 

Warning. Error encountered while saving cache 377616f718d2970e646cd030c1890fad19bd5c36/resume.css.scssc: can't dump anonymous class #<Class:0x007f7cefb6b200> 

Warning. Error encountered while saving cache 377616f718d2970e646cd030c1890fad19bd5c36/welcome.css.scssc: can't dump anonymous class #<Class:0x007f7cefb6b200> 

rake aborted! 
NoMethodError: undefined method `[]' for nil:NilClass 
    (in /app/app/assets/stylesheets/application.css) 
/app/vendor/bundle/ruby/2.1.0/gems/sprockets-2.12.2/lib/sprockets/sass_functions.rb:63:in `sprockets_context' 
/app/vendor/bundle/ruby/2.1.0/gems/sprockets-2.12.2/lib/sprockets/sass_functions.rb:38:in `font_path' 
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.5/lib/sass/script/tree/funcall.rb:140:in `_perform' 
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.5/lib/sass/script/tree/node.rb:50:in `perform' 
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.5/lib/sass/tree/visitors/perform.rb:392:in `visit_return' 
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.5/lib/sass/tree/visitors/base.rb:36:in `visit' 
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.5/lib/sass/tree/visitors/perform.rb:158:in `block in visit' 
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.5/lib/sass/stack.rb:79:in `block in with_base' 
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.5/lib/sass/stack.rb:115:in `with_frame' 
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.5/lib/sass/stack.rb:79:in `with_base' 
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.5/lib/sass/tree/visitors/perform.rb:158:in `visit' 
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.5/lib/sass/tree/visitors/perform.rb:8:in `visit' 
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.5/lib/sass/script/tree/funcall.rb:248:in `block (3 levels) in perform_sass_fn' 
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.5/lib/sass/script/tree/funcall.rb:248:in `each' 
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.5/lib/sass/script/tree/funcall.rb:248:in `block (2 levels) in perform_sass_fn' 
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.5/lib/sass/script/tree/funcall.rb:247:in `catch' 
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.5/lib/sass/script/tree/funcall.rb:247:in `block in perform_sass_fn' 
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.5/lib/sass/tree/visitors/perform.rb:84:in `perform_arguments' 
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.5/lib/sass/script/tree/funcall.rb:244:in `perform_sass_fn' 
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.5/lib/sass/script/tree/funcall.rb:131:in `_perform' 
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.5/lib/sass/script/tree/node.rb:50:in `perform' 
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.5/lib/sass/script/tree/operation.rb:64:in `_perform' 
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.5/lib/sass/script/tree/node.rb:50:in `perform' 
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.5/lib/sass/tree/visitors/perform.rb:458:in `visit_variable' 
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.5/lib/sass/tree/visitors/base.rb:36:in `visit' 
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.5/lib/sass/tree/visitors/perform.rb:158:in `block in visit' 
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.5/lib/sass/stack.rb:79:in `block in with_base' 
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.5/lib/sass/stack.rb:115:in `with_frame' 
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.5/lib/sass/stack.rb:79:in `with_base' 
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.5/lib/sass/tree/visitors/perform.rb:158:in `visit' 
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.5/lib/sass/tree/visitors/perform.rb:315:in `block (2 levels) in visit_import' 
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.5/lib/sass/tree/visitors/perform.rb:315:in `map' 
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.5/lib/sass/tree/visitors/perform.rb:315:in `block in visit_import' 
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.5/lib/sass/stack.rb:88:in `block in with_import' 
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.5/lib/sass/stack.rb:115:in `with_frame' 
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.5/lib/sass/stack.rb:88:in `with_import' 
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.5/lib/sass/tree/visitors/perform.rb:312:in `visit_import' 
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.5/lib/sass/tree/visitors/base.rb:36:in `visit' 
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.5/lib/sass/tree/visitors/perform.rb:158:in `block in visit' 
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.5/lib/sass/stack.rb:79:in `block in with_base' 
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.5/lib/sass/stack.rb:115:in `with_frame' 
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.5/lib/sass/stack.rb:79:in `with_base' 
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.5/lib/sass/tree/visitors/perform.rb:158:in `visit' 
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.5/lib/sass/tree/visitors/perform.rb:315:in `block (2 levels) in visit_import' 
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.5/lib/sass/tree/visitors/perform.rb:315:in `map' 
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.5/lib/sass/tree/visitors/perform.rb:315:in `block in visit_import' 
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.5/lib/sass/stack.rb:88:in `block in with_import' 
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.5/lib/sass/stack.rb:115:in `with_frame' 
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.5/lib/sass/stack.rb:88:in `with_import' 
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.5/lib/sass/tree/visitors/perform.rb:312:in `visit_import' 
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.5/lib/sass/tree/visitors/base.rb:36:in `visit' 
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.5/lib/sass/tree/visitors/perform.rb:158:in `block in visit' 
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.5/lib/sass/stack.rb:79:in `block in with_base' 
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.5/lib/sass/stack.rb:115:in `with_frame' 
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.5/lib/sass/stack.rb:79:in `with_base' 
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.5/lib/sass/tree/visitors/perform.rb:158:in `visit' 
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.5/lib/sass/tree/visitors/base.rb:52:in `block in visit_children' 
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.5/lib/sass/tree/visitors/base.rb:52:in `map' 
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.5/lib/sass/tree/visitors/base.rb:52:in `visit_children' 
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.5/lib/sass/tree/visitors/perform.rb:167:in `block in visit_children' 
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.5/lib/sass/tree/visitors/perform.rb:179:in `with_environment' 
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.5/lib/sass/tree/visitors/perform.rb:166:in `visit_children' 
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.5/lib/sass/tree/visitors/base.rb:36:in `block in visit' 
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.5/lib/sass/tree/visitors/perform.rb:186:in `visit_root' 
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.5/lib/sass/tree/visitors/base.rb:36:in `visit' 
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.5/lib/sass/tree/visitors/perform.rb:157:in `visit' 
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.5/lib/sass/tree/visitors/perform.rb:8:in `visit' 
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.5/lib/sass/tree/root_node.rb:36:in `css_tree' 
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.5/lib/sass/tree/root_node.rb:20:in `render' 
/app/vendor/bundle/ruby/2.1.0/gems/sass-3.4.5/lib/sass/engine.rb:268:in `render' 
/app/vendor/bundle/ruby/2.1.0/gems/sprockets-2.12.2/lib/sprockets/sass_compressor.rb:24:in `evaluate' 
/app/vendor/bundle/ruby/2.1.0/gems/tilt-1.4.1/lib/tilt/template.rb:103:in `render' 
/app/vendor/bundle/ruby/2.1.0/gems/sprockets-2.12.2/lib/sprockets/context.rb:197:in `block in evaluate' 
/app/vendor/bundle/ruby/2.1.0/gems/sprockets-2.12.2/lib/sprockets/context.rb:194:in `each' 
/app/vendor/bundle/ruby/2.1.0/gems/sprockets-2.12.2/lib/sprockets/context.rb:194:in `evaluate' 
/app/vendor/bundle/ruby/2.1.0/gems/sprockets-2.12.2/lib/sprockets/bundled_asset.rb:25:in `initialize' 
/app/vendor/bundle/ruby/2.1.0/gems/sprockets-2.12.2/lib/sprockets/base.rb:377:in `new' 
/app/vendor/bundle/ruby/2.1.0/gems/sprockets-2.12.2/lib/sprockets/base.rb:377:in `build_asset' 
/app/vendor/bundle/ruby/2.1.0/gems/sprockets-2.12.2/lib/sprockets/index.rb:94:in `block in build_asset' 
/app/vendor/bundle/ruby/2.1.0/gems/sprockets-2.12.2/lib/sprockets/caching.rb:58:in `cache_asset' 
/app/vendor/bundle/ruby/2.1.0/gems/sprockets-2.12.2/lib/sprockets/index.rb:93:in `build_asset' 
/app/vendor/bundle/ruby/2.1.0/gems/sprockets-2.12.2/lib/sprockets/base.rb:287:in `find_asset' 
/app/vendor/bundle/ruby/2.1.0/gems/sprockets-2.12.2/lib/sprockets/index.rb:61:in `find_asset' 
/app/vendor/bundle/ruby/2.1.0/gems/sprockets-2.12.2/lib/sprockets/manifest.rb:211:in `block in find_asset' 
/app/vendor/bundle/ruby/2.1.0/gems/sprockets-2.12.2/lib/sprockets/manifest.rb:257:in `benchmark' 
/app/vendor/bundle/ruby/2.1.0/gems/sprockets-2.12.2/lib/sprockets/manifest.rb:210:in `find_asset' 
/app/vendor/bundle/ruby/2.1.0/gems/sprockets-2.12.2/lib/sprockets/manifest.rb:119:in `block in compile' 
/app/vendor/bundle/ruby/2.1.0/gems/sprockets-2.12.2/lib/sprockets/manifest.rb:118:in `each' 
/app/vendor/bundle/ruby/2.1.0/gems/sprockets-2.12.2/lib/sprockets/manifest.rb:118:in `compile' 
/app/vendor/bundle/ruby/2.1.0/gems/sprockets-rails-3.0.0.beta1/lib/sprockets/rails/task.rb:70:in `block (3 levels) in define' 
/app/vendor/bundle/ruby/2.1.0/gems/sprockets-2.12.2/lib/rake/sprocketstask.rb:146:in `with_logger' 
/app/vendor/bundle/ruby/2.1.0/gems/sprockets-rails-3.0.0.beta1/lib/sprockets/rails/task.rb:69:in `block (2 levels) in define' 
/app/vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/lib/rake/task.rb:240:in `call' 
/app/vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/lib/rake/task.rb:240:in `block in execute' 
/app/vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/lib/rake/task.rb:235:in `each' 
/app/vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/lib/rake/task.rb:235:in `execute' 
/app/vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/lib/rake/task.rb:179:in `block in invoke_with_call_chain' 
/app/vendor/ruby-2.1.0/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize' 
/app/vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/lib/rake/task.rb:172:in `invoke_with_call_chain' 
/app/vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/lib/rake/task.rb:165:in `invoke' 
/app/vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/lib/rake/application.rb:150:in `invoke_task' 
/app/vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/lib/rake/application.rb:106:in `block (2 levels) in top_level' 
/app/vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/lib/rake/application.rb:106:in `each' 
/app/vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/lib/rake/application.rb:106:in `block in top_level' 
/app/vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/lib/rake/application.rb:115:in `run_with_threads' 
/app/vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/lib/rake/application.rb:100:in `top_level' 
/app/vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/lib/rake/application.rb:78:in `block in run' 
/app/vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/lib/rake/application.rb:176:in `standard_exception_handling' 
/app/vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/lib/rake/application.rb:75:in `run' 
/app/vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/bin/rake:33:in `<top (required)>' 
/app/vendor/bundle/ruby/2.1.0/bin/rake:23:in `load' 
/app/vendor/bundle/ruby/2.1.0/bin/rake:23:in `<main>' 
Tasks: TOP => assets:precompile 
+0

檢查了這一點作爲一個可能的問題,如果你正在使用SASS:資產編譯崩潰的服務器] [1] [1]:http://stackoverflow.com/questions/24809432/asset-編譯 - 崩潰 - 服務器 - 環境 - 與 - nomethoderror - undefined-m – 2014-11-25 16:25:04

+0

看起來像你的問題在這裏:'無方法錯誤:未定義的方法'[]'爲零:NilClass(在/應用程序/資產/樣式表/應用程序的CSS)'。你能否包含application.css? – ccanduc 2014-12-01 18:13:07

回答

0

這發生在我之前,它最終成爲無效的CSS在開發模式本地沒有標記。如果你在本地編譯,它應該給你一些關於錯誤的附加信息。

RAILS_ENV=production bin/rake assets:precompile 

上一次我有這個問題,這是因爲缺少冒號。

相關問題