git push heroku master was rejected. i did some digging in the log and here is what i found. i have never seen this before.

this was the first thing in the log that looked like it did not go well. everything before was successful.

rake aborted!
   Invalid CSS after "*/": expected identifier, was "/*!"
   (in /tmp/build_2a4aaujom538/app/assets/stylesheets/application.css)

at the very end, the push stops and here is the reason

Precompiling assets failed.
Push rejected, failed to compile Ruby/Rails app
[remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:triprecs.git'

any ideas on what to check/fix? thanks

有帮助吗?

解决方案 2

The issue here was i had a comment out of place in one of my css files. Make sure your CSS files are clean before pushing. I had an accidental /* in my application.css.erb file which was not commenting anything out. When i removed it, the push worked!

其他提示

It seems there is an issue with nested comments being poorly handled by the sass compiler during asset precompilation.

http://www.madflanderz.de/madblog/archives/307/heroku-rake-assetsprecompile-failed-invalid-css/

Removing nested comments in CSS (// lines within /* */ blocks) should solve the issue. This may be harder with third-party CSS libraries you've included in your project. In that case an upgrade of sass-rails could help (but this is something I've never tried).

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top