2014-09-12 211 views
1

我在Ruby on Rails中有一個應用程序,我想將它部署到Heroku。當我使用:失敗部署到heroku

混帳推Heroku的主

我收到:

Running: rake assets:precompile 
    I, [2014-09-12T22:53:19.712552 #3977] INFO -- : Writing /tmp/build_8144ac61-2b4d-4c33-a84b-773d3ed45107/public/assets/application-aa652d65aa266c50abd3d3923088bd7b.js 
    Warning. Error encountered while saving cache 54dea0949cb8162db200869afc1e3ec3e59aa6f5/application.css.scssc: can't dump anonymous class #<Class:0x007f69378b55e0> 
    Warning. Error encountered while saving cache 6494cddcc41216a13b0133cf1ff1a38d862cca7d/bootstrap.cssc: can't dump anonymous class #<Class:0x007f69378b55e0> 
    I, [2014-09-12T22:53:21.996810 #3977] INFO -- : Writing /tmp/build_8144ac61-2b4d-4c33-a84b-773d3ed45107/public/assets/application-1fa80de3f5da7b963874482caa63bdec.css 
    I, [2014-09-12T22:53:22.003454 #3977] INFO -- : Writing /tmp/build_8144ac61-2b4d-4c33-a84b-773d3ed45107/public/assets/bootstrap/glyphicons-halflings-regular-f1da5588b59d269c3dc4cb4cace31400.eot 
    I, [2014-09-12T22:53:22.005586 #3977] INFO -- : Writing /tmp/build_8144ac61-2b4d-4c33-a84b-773d3ed45107/public/assets/bootstrap/glyphicons-halflings-regular-6f65445249d6bb87a786a1a13a0a45a6.svg 
    I, [2014-09-12T22:53:22.007571 #3977] INFO -- : Writing /tmp/build_8144ac61-2b4d-4c33-a84b-773d3ed45107/public/assets/bootstrap/glyphicons-halflings-regular-35f432c4b92a1a110edde9f76e6e5ce7.ttf 
    I, [2014-09-12T22:53:22.009543 #3977] INFO -- : Writing /tmp/build_8144ac61-2b4d-4c33-a84b-773d3ed45107/public/assets/bootstrap/glyphicons-halflings-regular-9c39baa8409ae5776b4dcfa54a685bf8.woff 
    I, [2014-09-12T22:53:22.134260 #3977] INFO -- : Writing /tmp/build_8144ac61-2b4d-4c33-a84b-773d3ed45107/public/assets/bootstrap/affix-92368f20b1e758f02b5ca11f872a7752.js 
    I, [2014-09-12T22:53:22.220282 #3977] INFO -- : Writing /tmp/build_8144ac61-2b4d-4c33-a84b-773d3ed45107/public/assets/bootstrap/alert-c2357af988be9ad011c1f3ba46beaddb.js 
    I, [2014-09-12T22:53:22.310256 #3977] INFO -- : Writing /tmp/build_8144ac61-2b4d-4c33-a84b-773d3ed45107/public/assets/bootstrap/button-17cac2dc446e444848863bfc4776e852.js 
    I, [2014-09-12T22:53:22.647225 #3977] INFO -- : Writing /tmp/build_8144ac61-2b4d-4c33-a84b-773d3ed45107/public/assets/bootstrap/carousel-e9b647222f7dd671b4565bd842afa643.js 
    I, [2014-09-12T22:53:22.768327 #3977] INFO -- : Writing /tmp/build_8144ac61-2b4d-4c33-a84b-773d3ed45107/public/assets/bootstrap/collapse-810e66df78dde2cc207c63ef17d5c2e8.js 
    I, [2014-09-12T22:53:22.870856 #3977] INFO -- : Writing /tmp/build_8144ac61-2b4d-4c33-a84b-773d3ed45107/public/assets/bootstrap/dropdown-8413f8357355cb6669b65ec46750e200.js 
    I, [2014-09-12T22:53:23.052750 #3977] INFO -- : Writing /tmp/build_8144ac61-2b4d-4c33-a84b-773d3ed45107/public/assets/bootstrap/modal-7be05ab2cc23ccf7ad1be26c81be1416.js 
    I, [2014-09-12T22:53:23.149494 #3977] INFO -- : Writing /tmp/build_8144ac61-2b4d-4c33-a84b-773d3ed45107/public/assets/bootstrap/popover-0d1a5c674a16da1bb5426410a9eed66b.js 
    I, [2014-09-12T22:53:23.650615 #3977] INFO -- : Writing /tmp/build_8144ac61-2b4d-4c33-a84b-773d3ed45107/public/assets/bootstrap/scrollspy-ceecc136ebf2d51fc366ccbe558ea772.js 
    I, [2014-09-12T22:53:23.710636 #3977] INFO -- : Writing /tmp/build_8144ac61-2b4d-4c33-a84b-773d3ed45107/public/assets/bootstrap/tab-1b0a1bca02063c2bca12e6199ae06988.js 
    I, [2014-09-12T22:53:24.147128 #3977] INFO -- : Writing /tmp/build_8144ac61-2b4d-4c33-a84b-773d3ed45107/public/assets/bootstrap/tooltip-71bda573b0a8c849e2ca2220b5764303.js 
    I, [2014-09-12T22:53:24.199479 #3977] INFO -- : Writing /tmp/build_8144ac61-2b4d-4c33-a84b-773d3ed45107/public/assets/bootstrap/transition-61115fa95fb6e75a229bc2ae598f5e1c.js 
    Warning. Error encountered while saving cache 225fb679bd2b2336b68e1237ebb4440fe415f4b0/_alerts.scssc: can't dump anonymous class #<Class:0x007f69378b55e0> 
    rake aborted! 
    Sass::SyntaxError: Undefined variable: "$alert-padding". 

我用的自舉。在應用程序/資產/ stylesheets.css.scss我:

@import 「引導」;

供應商/資產/樣式我有bootstrap.css和bootstrap.min.css

在我production.rb我有其他中:

config.serve_static_assets = true 
config.assets.compile = true 
config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx 
config.cache_store = :dalli_store 
config.assets.precompile += %w(bootstrap/*.css bootstrap/*.js) 

我顯然使用rake資源:預編譯,那麼這有什麼問題?

回答

0

確保您使用的引導,薩斯寶石在你的Gemfile

gem 'bootstrap-sass' 

編輯:另外,根據這裏的另一個線程,顯然可能有包含連字符的文件有問題。嘗試刪除連字符。

+0

這將使不同的錯誤(事「找不到要導入的文件「,並給出了它嘗試的搜索路徑列表)。 – cimmanon 2014-09-13 01:12:01

0

您是否嘗試降級您的sass寶石?

試試這個:

gem "sass", "~> 3.2.5" 
gem 'sass-rails' 
-1

薩斯尋找正確的語法,請與你的CSS文件做檢查,如果有任何「白色空間」中刪除它像