ошибка sass в приложении rails на героку: не удается сбросить анонимный класс

Я получаю следующие предупреждения от heroku после попытки включить исходные карты для chrome http://blog.vhyza.eu/blog/2013/09/22/debugging-rails-4-coffeescript-and-sass-source-files-in-google-chrome/ На что они указывают и что мне следует изменить?

Мой гемфайл:

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
#

мой журнал ошибок:

       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>

... обрезанный ...

       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.

... обрезанный ...

       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>

... обрезанный ...

       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)

person Harry Moreno    schedule 14.12.2013    source источник
comment
Возможно, ваш sass gem находится в альфа-версии, попробуйте перейти на стабильную версию, ссылка здесь: github.com /посредник/посредник/вопросы/716   -  person Ta Duy Anh    schedule 14.12.2013
comment
Карты @Taiki Source отсутствуют в стабильной версии Sass, чтобы получить их, вам необходимо запустить крайнюю/альфа-версию.   -  person cimmanon    schedule 16.12.2013
comment
Привет, Гарри, ты когда-нибудь решил эту проблему? У меня сегодня аналогичная проблема.   -  person AndyM    schedule 31.01.2014
comment
@AndyM поцарапай это. Я все еще получаю сообщение об ошибке. Недавно вернулся к проекту :/   -  person Harry Moreno    schedule 05.02.2014
comment
Какая текущая стабильная версия?   -  person Augustin Riedinger    schedule 12.03.2014
comment
@AugustinRiedinger для чего? Стабильные версии драгоценных камней — это все, что вы получаете от rubygems.org.   -  person Harry Moreno    schedule 12.03.2014
comment
Ну, я использую dalli, sass и sass-rails от rubygem, и, видимо, мне пришлось понизить версию, чтобы не получать сообщения об ошибках, которые вы упомянули в этом посте. Это не совсем то, что я называю стабильным.   -  person Augustin Riedinger    schedule 13.03.2014
comment
@AugustinRiedinger поднимет вопрос с сопровождающими. Они решают, что широко распространять.   -  person Harry Moreno    schedule 13.03.2014


Ответы (3)


Я узнал, что проблема была в моем файле env.

config.cache_store = :dalli_store

Я знаю, что это необходимо для ускорения компиляции, но пока я могу обойтись без этого, пока не найду ответ и не узнаю, как это исправить.

person MetaSkills    schedule 26.02.2014
comment
Всем, кто еще хочет следить за этой ошибкой, посмотрите тикет 1093 и 1028 - person lightswitch05; 04.03.2014

Я смог обойти эту проблему, понизив свой драгоценный камень sass (который был доставлен sass-rails).

Мой Gemfile теперь содержит:

gem "sass", "~> 3.2.5"
gem 'sass-rails'
person joshs    schedule 19.03.2014
comment
По-видимому, sass 3.3.0 (и, возможно, базовый пакет sprockets) вызывает эту проблему: см. stackoverflow.com/a/22287503/550712. В моем проекте Rails 3.2.16 я смог использовать последнюю версию sass ‹ 3.3.0 (в настоящее время 3.2.19) с sass-rails 3.2.6, чтобы получить активы для чистой предварительной компиляции. - person Mark Berry; 02.05.2014
comment
Это сработало и для меня (Rails 3.2.18, sass-rails 3.2.6, sass 3.2.19). - person Andy Stewart; 03.10.2014

У меня была такая же проблема во время написания этого поста, но тогда я использовал sass-rails 5.0.0.beta1, но я подтверждаю, что вместо понижения версии вы можете обновиться до последней версии sass-rails 5.0.0, и все будет хорошо. Сделайте обновление до последней версии вместо понижения.

person emi    schedule 19.12.2014
comment
Вау, спасибо большое, никто не упомянул об этом. Я смотрел на свой гем sass, и он явно был не 3.2 (у которого, согласно github, были проблемы) - person Scientist1642; 20.02.2015