2014-09-12 189 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文件做检查,如果有任何“白色空间”中删除它像