1

I got an error when trying to push an app to heroku.

 !
 !     Precompiling assets failed.
 !
 !     Push rejected, failed to compile Ruby app

When I scroll up I see the following error:

   NoMethodError: undefined method `specificity' for [:not(.button)]:Array
   (in /tmp/build_3060eff8-6b06-48b5-8d0d-51ce090945b4/app/assets/stylesheets/foundation_and_overrides.scss)

The app exists for quite a while, and I updated it last week with no problems. In this push I only have minor changes.

I don't see anything in foundation_and_overrides.scss that relates to 'specificity' or the :not(button) selector

When running locally:

rake assets:precompiled --trace

Got the same error:

 ** Execute assets:precompile:primary
rake aborted!
NoMethodError: undefined method `specificity' for [:not(.button)]:Array
  (in C:/Sites/..../app/assets/stylesheets/foundation_and_overrides.scss)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/sass-3.4.6/lib/sass/selector/abstract_sequence.rb:96:in `block in _specificity'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/sass-3.4.6/lib/sass/selector/abstract_sequence.rb:94:in `each'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/sass-3.4.6/lib/sass/selector/abstract_sequence.rb:94:in `_specificity'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/sass-3.4.6/lib/sass/selector/abstract_sequence.rb:86:in `specificity'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/sass-3.4.6/lib/sass/selector/abstract_sequence.rb:96:in `block in _specificity'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/sass-3.4.6/lib/sass/selector/abstract_sequence.rb:94:in `each'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/sass-3.4.6/lib/sass/selector/abstract_sequence.rb:94:in `_specificity'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/sass-3.4.6/lib/sass/selector/abstract_sequence.rb:86:in `specificity'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/sass-3.4.6/lib/sass/selector/sequence.rb:550:in `block (3 levels) in trim'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/set.rb:222:in `block in each'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/set.rb:222:in `each_key'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/set.rb:222:in `each'
Igal S.
  • 13,146
  • 5
  • 30
  • 48
  • 2
    possible duplicate of [Magento CE 1.9 - SCSS / Compass compile error](http://stackoverflow.com/questions/26431889/magento-ce-1-9-scss-compass-compile-error) – cimmanon Sep 08 '15 at 13:10

3 Answers3

5

@pazinjanka, you're life saver! I downgraded, and it's work like a charm again. To install 3.4.5 use command sudo gem install sass -v 3.4.5

matliks
  • 71
  • 7
1

did you try to precompile them locally?

RAILS_ENV=production bundle exec rake assets:precompile

maybe you can post more backtrace from the error?

did you update some of your gems (Sass?), maybe it might have something to do with: https://github.com/sass/sass/issues/1476 not sure, just guessing ...

pazinjanka
  • 325
  • 1
  • 7
  • I updated the question with the output. Same error. Maybe heroku updates the Gems automatically. I am not sure. I will dig further in the link you provided. – Igal S. Oct 19 '14 at 19:03
  • from the trace it definitely looks like sass-3.4.6 bug, you can always downgrade your sass version till they fix it. good luck! – pazinjanka Oct 19 '14 at 19:17
0

If you already have installed a higher version of sass. Do this:

Add this to gemfile

Gemfile:

gem 'sass', '3.4.5'

Then run bundle update sass

Philip
  • 6,827
  • 13
  • 75
  • 104