user3014317
user3014317

Reputation: 383

Failed deploy to heroku

I have an application in Ruby on Rails and I'd like to deploy it to Heroku. When I use:

git push heroku master

I receive:

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".

I use Boostrap. In app/assets/stylesheets.css.scss I have:

@import "bootstrap";

and in vendor/assets/stylesheets I have bootstrap.css and bootstrap.min.css

In my production.rb I have among other:

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 )

I obviously use rake assets:precompile, so what's wrong with thatt?

Upvotes: 1

Views: 174

Answers (3)

hamitron
hamitron

Reputation: 219

make sure you're using the bootstrap-sass gem in your Gemfile

gem 'bootstrap-sass'

EDIT: Also according to another thread here, apparently there may be a problem with files that contain hyphens. Try removing the hyphens.

Upvotes: 0

spkpraveen
spkpraveen

Reputation: 1

Sass looks for the correct syntax please do check with your css file if there is any "white spaces " remove it

Upvotes: -1

Gustavo Varallo
Gustavo Varallo

Reputation: 31

Did you try to downgrade your sass gems?

Try this:

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

Upvotes: 0

Related Questions