Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

sass error in rails app on heroku: can't dump anonymous class

I'm getting the following warnings from heroku after trying to enable source maps for chrome http://blog.vhyza.eu/blog/2013/09/22/debugging-rails-4-coffeescript-and-sass-source-files-in-google-chrome/ What do they indicate and what, if anything, should I change?

My gemfile:

source 'https://rubygems.org'
ruby '2.0.0'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.0'

# Use sqlite3 as the database for Active Record
#gem 'sqlite3'
gem 'pg'
gem 'devise'
gem 'font-awesome-rails'
gem 'bootstrap-sass', github: 'thomas-mcdonald/bootstrap-sass'
gem 'simple_form', git: 'https://github.com/plataformatec/simple_form.git'
gem 'carrierwave'
gem 'fog', '~> 1.3.1'
gem 'mini_magick'
gem 'rails_12factor'
gem 'friendly_id', '~> 5.0.0'

# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.0'
gem 'bourbon'

group :development do
  gem 'sass-rails-source-maps'
end

# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'

# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'

# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby

# Use jquery as the JavaScript library
gem 'jquery-rails', '~> 3.0'

# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
# gem 'turbolinks'

# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 1.2'

group :doc do
  # bundle exec rake doc:rails generates the API under doc/api.
  gem 'sdoc', require: false
end

# Use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'

# Use unicorn as the app server
# gem 'unicorn'

# Use Capistrano for deployment
# gem 'capistrano', group: :development

# Use debugger
#

my error log:

       Running: rake assets:precompile
       Warning. Error encountered while saving cache caaf9b127eacbc8d55c6b0df080ed0d983d6c0ac/application.css.scssc: can't dump anonymous class #<Class:0x007f9af404e7a0>
       Warning. Error encountered while saving cache 29b09f293164ce1d09e4f27743f6d079f2f4f07e/_bourbon.scssc: can't dump anonymous class #<Class:0x007f9af404e7a0>
       Warning. Error encountered while saving cache f432cc7b803f4c796599d16a379d862748156dd8/_deprecated-webkit-gradient.scssc: can't dump anonymous class #<Class:0x007f9af404e7a0>

... clipped ...

       Warning. Error encountered while saving cache 1a45a1496fb361a3cf719ffc3cecf01b3639f108/_clearfix.scssc: can't dump anonymous class #<Class:0x007f9af404e7a0>
       Warning. Error encountered while saving cache 1a45a1496fb361a3cf719ffc3cecf01b3639f108/_font-family.scssc: can't dump anonymous class #<Class:0x007f9af404e7a0>
       Warning. Error encountered while saving cache 1a45a1496fb361a3cf719ffc3cecf01b3639f108/_hide-text.scssc: can't dump anonymous class #<Class:0x007f9af404e7a0>
       Warning. Error encountered while saving cache 1a45a1496fb361a3cf719ffc3cecf01b3639f108/_html5-input-types.scssc: can't dump anonymous class #<Class:0x007f9af404e7a0>
       DEPRECATION WARNING on line 25 of /tmp/build_502e235d-b5cc-428d-b0dc-0ba968b29b22/vendor/bundle/ruby/2.0.0/gems/bourbon-3.1.8/app/assets/stylesheets/addons/_html5-input-types.scss:
       Assigning to global variable "$unquoted-inputs-list" by default is deprecated.
       In future versions of Sass, this will create a new local variable.
       If you want to assign to the global variable, use "$unquoted-inputs-list: append($unquoted-inputs-list, unquote($input-type), comma) !global" instead.
       DEPRECATION WARNING on line 25 of /tmp/build_502e235d-b5cc-428d-b0dc-0ba968b29b22/vendor/bundle/ruby/2.0.0/gems/bourbon-3.1.8/app/assets/stylesheets/addons/_html5-input-types.scss:
       Assigning to global variable "$unquoted-inputs-list" by default is deprecated.
       In future versions of Sass, this will create a new local variable.
       If you want to assign to the global variable, use "$unquoted-inputs-list: append($unquoted-inputs-list, unquote($input-type), comma) !global" instead.
       DEPRECATION WARNING on line 25 of /tmp/build_502e235d-b5cc-428d-b0dc-0ba968b29b22/vendor/bundle/ruby/2.0.0/gems/bourbon-3.1.8/app/assets/stylesheets/addons/_html5-input-types.scss:
       Assigning to global variable "$unquoted-inputs-list" by default is deprecated.
       In future versions of Sass, this will create a new local variable.
       If you want to assign to the global variable, use "$unquoted-inputs-list: append($unquoted-inputs-list, unquote($input-type), comma) !global" instead.

... clipped ...

       DEPRECATION WARNING on line 44 of /tmp/build_502e235d-b5cc-428d-b0dc-0ba968b29b22/vendor/bundle/ruby/2.0.0/gems/bourbon-3.1.8/app/assets/stylesheets/addons/_html5-input-types.scss:
       Assigning to global variable "$all-text-inputs-focus" by default is deprecated.
       In future versions of Sass, this will create a new local variable.
       If you want to assign to the global variable, use "$all-text-inputs-focus: append($all-text-inputs-focus, $input-type-focus, comma) !global" instead.
       DEPRECATION WARNING on line 44 of /tmp/build_502e235d-b5cc-428d-b0dc-0ba968b29b22/vendor/bundle/ruby/2.0.0/gems/bourbon-3.1.8/app/assets/stylesheets/addons/_html5-input-types.scss:
       Assigning to global variable "$all-text-inputs-focus" by default is deprecated.
       In future versions of Sass, this will create a new local variable.
       If you want to assign to the global variable, use "$all-text-inputs-focus: append($all-text-inputs-focus, $input-type-focus, comma) !global" instead.
       DEPRECATION WARNING on line 44 of /tmp/build_502e235d-b5cc-428d-b0dc-0ba968b29b22/vendor/bundle/ruby/2.0.0/gems/bourbon-3.1.8/app/assets/stylesheets/addons/_html5-input-types.scss:
       Assigning to global variable "$all-text-inputs-focus" by default is deprecated.
       In future versions of Sass, this will create a new local variable.
       If you want to assign to the global variable, use "$all-text-inputs-focus: append($all-text-inputs-focus, $input-type-focus, comma) !global" instead.
       Warning. Error encountered while saving cache 1a45a1496fb361a3cf719ffc3cecf01b3639f108/_position.scssc: can't dump anonymous class #<Class:0x007f9af404e7a0>
       Warning. Error encountered while saving cache 1a45a1496fb361a3cf719ffc3cecf01b3639f108/_prefixer.scssc: can't dump anonymous class #<Class:0x007f9af404e7a0>
       Warning. Error encountered while saving cache 1a45a1496fb361a3cf719ffc3cecf01b3639f108/_retina-image.scssc: can't dump anonymous class #<Class:0x007f9af404e7a0>

... clipped ...

       Warning. Error encountered while saving cache caaf9b127eacbc8d55c6b0df080ed0d983d6c0ac/users.css.scssc: can't dump anonymous class #<Class:0x007f9af404e7a0>
       Warning. Error encountered while saving cache 46ee9071a8688db94b0b5f37c155438469009e50/font-awesome.css.erbc: can't dump anonymous class #<Class:0x007f9af404e7a0>
       Warning. Error encountered while saving cache caaf9b127eacbc8d55c6b0df080ed0d983d6c0ac/comments.css.scssc: can't dump anonymous class #<Class:0x007f9af404e7a0>
       I, [2013-12-14T02:00:10.168503 #765]  INFO -- : Writing /tmp/build_502e235d-b5cc-428d-b0dc-0ba968b29b22/public/assets/application-26c0def79d3f5f44f52eb91252ea1cc5.css
       Asset precompilation completed (20.56s)
like image 287
Harry Moreno Avatar asked Dec 14 '13 02:12

Harry Moreno


3 Answers

I was able able to work around this issue by downgrading my sass gem (which was being brought in by sass-rails).

My Gemfile now contains:

gem "sass", "~> 3.2.5"
gem 'sass-rails'
like image 107
joshs Avatar answered Nov 09 '22 06:11

joshs


I found out that the problem was this in my env file.

config.cache_store = :dalli_store

I know this is needed to help speed up compilation, but I can do without it for now till I found back and found out how to fix it proper.

like image 3
MetaSkills Avatar answered Nov 09 '22 06:11

MetaSkills


I had this same problem at the time of writing this post but then I was using sass-rails 5.0.0.beta1 but I'm confirming that instead of downgrading you can upgrade to the latest sass-rails 5.0.0 and everything will be fine. Do an upgrade to the latest version instead of downgrading.

like image 3
emi Avatar answered Nov 09 '22 06:11

emi