Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
809 views
in Technique[技术] by (71.8m points)

ruby on rails - Warning. Error encountered while saving cache ... can't dump anonymous class

When app is deployed with capistrano errors occur in production.log.

Compiled signup.css  (30ms)  (pid 31797)
Warning. Error encountered while saving cache /home/deployer/apps/example.com/releases/20140315211501/tmp/cache/sass/c76a96d592cb37dc7092a4e2f10ad8d3d22bcc8b/user_sessions.css.scssc: can't dump anonymous class #<Class:0x0000000356d120>

Compiled user_sessions/user_sessions.css  (16ms)  (pid 31797)
Compiled user_sessions.css  (20ms)  (pid 31797)
Warning. Error encountered while saving cache /home/deployer/apps/example.com/releases/20140315211501/tmp/cache/sass/a59f84087c66a48b1521281da138ce9e3ed4c217/welcome.css.scssc: can't dump anonymous class #<Class:0x0000000356d120>

This is Gemfile.lock I am using.

GIT
  remote: git://github.com/tomazzlender/letter_opener.git
  revision: 29b17fefe87b8fdc7ead987dbfabe355b59ff684
  specs:
    letter_opener (0.0.2)
      launchy

GIT
  remote: git://github.com/tomazzlender/premailer.git
  revision: 88af5e6f60ac78ef1d70d6f0a6f4b7612d2c5f7a
  specs:
    premailer (1.7.3)
      css_parser (>= 1.1.9)
      htmlentities (>= 4.0.0)

GIT
  remote: git://github.com/tomazzlender/snapshot.git
  revision: 0f0f3fd024bf5a3a846e999b845803ae61d870c0
  specs:
    snapshot (1.1.0)

GIT
  remote: https://github.com/37signals/mail_view.git
  revision: c8cc1315026ce85973ef56e628ac2e38a7a95563
  specs:
    mail_view (1.0.1)
      tilt

GIT
  remote: https://github.com/thoughtbot/capybara-webkit.git
  revision: 11c596f7a06dbda123c077440f9275905f89e869
  specs:
    capybara-webkit (0.13.0)
      capybara (>= 2.0.1)
      json

GEM
  remote: https://rubygems.org/
  specs:
    actionmailer (3.2.17)
      actionpack (= 3.2.17)
      mail (~> 2.5.4)
    actionpack (3.2.17)
      activemodel (= 3.2.17)
      activesupport (= 3.2.17)
      builder (~> 3.0.0)
      erubis (~> 2.7.0)
      journey (~> 1.0.4)
      rack (~> 1.4.5)
      rack-cache (~> 1.2)
      rack-test (~> 0.6.1)
      sprockets (~> 2.2.1)
    active_attr (0.7.0)
      activemodel (>= 3.0.2, < 4.1)
      activesupport (>= 3.0.2, < 4.1)
    activemodel (3.2.17)
      activesupport (= 3.2.17)
      builder (~> 3.0.0)
    activerecord (3.2.17)
      activemodel (= 3.2.17)
      activesupport (= 3.2.17)
      arel (~> 3.0.2)
      tzinfo (~> 0.3.29)
    activeresource (3.2.17)
      activemodel (= 3.2.17)
      activesupport (= 3.2.17)
    activesupport (3.2.17)
      i18n (~> 0.6, >= 0.6.4)
      multi_json (~> 1.0)
    addressable (2.2.7)
    ansi (1.4.3)
    arel (3.0.3)
    authlogic (3.1.0)
      activerecord (>= 3.0.7)
      activerecord (>= 3.0.7)
    builder (3.0.4)
    capistrano (2.9.0)
      highline
      net-scp (>= 1.0.0)
      net-sftp (>= 2.0.0)
      net-ssh (>= 2.0.14)
      net-ssh-gateway (>= 1.1.0)
    capybara (2.0.2)
      mime-types (>= 1.16)
      nokogiri (>= 1.3.3)
      rack (>= 1.0.0)
      rack-test (>= 0.5.4)
      selenium-webdriver (~> 2.0)
      xpath (~> 1.0.0)
    childprocess (0.3.6)
      ffi (~> 1.0, >= 1.0.6)
    chronic (0.6.7)
    coffee-rails (3.2.2)
      coffee-script (>= 2.2.0)
      railties (~> 3.2.0)
    coffee-script (2.2.0)
      coffee-script-source
      execjs
    coffee-script-source (1.2.0)
    css_parser (1.2.6)
      addressable
      rdoc
    erubis (2.7.0)
    eventmachine (1.0.0)
    exception_notification (3.0.0)
      actionmailer (>= 3.0.4)
      tinder (~> 1.8)
    execjs (1.3.0)
      multi_json (~> 1.0)
    faraday (0.8.4)
      multipart-post (~> 1.1)
    faraday_middleware (0.9.0)
      faraday (>= 0.7.4, < 0.9)
    ffi (1.2.0)
    hashie (1.2.0)
    highline (1.6.11)
    hike (1.2.3)
    htmlentities (4.3.1)
    http_parser.rb (0.5.3)
    i18n (0.6.9)
    journey (1.0.4)
    jquery-rails (2.0.3)
      railties (>= 3.1.0, < 5.0)
      thor (~> 0.14)
    json (1.8.1)
    kgio (2.7.2)
    launchy (2.1.0)
      addressable (~> 2.2.6)
    libwebsocket (0.1.7.1)
      addressable
      websocket
    mail (2.5.4)
      mime-types (~> 1.16)
      treetop (~> 1.4.8)
    marginalia (1.1.0)
      actionpack (>= 2.3, < 3.3)
      activerecord (>= 2.3, < 3.3)
    meta_request (0.2.1)
      rack-contrib
      rails
    mime-types (1.25.1)
    minitest (4.3.3)
    minitest-capybara (0.1.0)
      capybara (>= 1.0)
      minitest-matchers (>= 1.2)
    minitest-matchers (1.2.0)
      minitest (>= 2.5.0)
    minitest-rails (0.3)
      minitest (~> 4.0)
      rails (~> 3.0)
    minitest-rails-capybara (0.1)
      minitest-capybara (~> 0.1)
      minitest-rails (~> 0.1)
    multi_json (1.9.0)
    multipart-post (1.1.5)
    net-scp (1.0.4)
      net-ssh (>= 1.99.1)
    net-sftp (2.0.5)
      net-ssh (>= 2.0.9)
    net-ssh (2.3.0)
    net-ssh-gateway (1.1.0)
      net-ssh (>= 1.99.1)
    nokogiri (1.5.0)
    pg (0.17.1)
    polyglot (0.3.4)
    premailer-rails3 (1.3.1)
      premailer (~> 1.7)
      rails (~> 3)
    psych (1.3.4)
    quiet_assets (1.0.1)
      railties (~> 3.1)
    rack (1.4.5)
    rack-cache (1.2)
      rack (>= 0.4)
    rack-contrib (1.1.0)
      rack (>= 0.9.1)
    rack-ssl (1.3.3)
      rack
    rack-test (0.6.2)
      rack (>= 1.0)
    rails (3.2.17)
      actionmailer (= 3.2.17)
      actionpack (= 3.2.17)
      activerecord (= 3.2.17)
      activeresource (= 3.2.17)
      activesupport (= 3.2.17)
      bundler (~> 1.0)
      railties (= 3.2.17)
    railties (3.2.17)
      actionpack (= 3.2.17)
      activesupport (= 3.2.17)
      rack-ssl (~> 1.3.2)
      rake (>= 0.8.7)
      rdoc (~> 3.4)
      thor (>= 0.14.6, < 2.0)
    raindrops (0.8.0)
    rake (10.1.1)
    rdoc (3.12.2)
      json (~> 1.4)
    ruby-ole (1.2.11.3)
    rubyzip (0.9.6.1)
    sass (3.2.6)
    sass-rails (3.2.6)
      railties (~> 3.2.0)
      sass (>= 3.1.10)
      tilt (~> 1.3)
    selenium-webdriver (2.27.2)
      childprocess (>= 0.2.5)
      libwebsocket (~> 0.1.3)
      multi_json (~> 1.0)
      rubyzip
    sheets (1.1.0)
      nokogiri (>= 1.4.3.1)
      rubyzip (>= 0.9.4)
      spreadsheet (>= 0.6.5.2)
    simple_oauth (0.1.9)
    spreadsheet (0.6.8)
      ruby-ole (>= 1.0)
    sprockets (2.2.2)
      hike (~> 1.2)
      multi_json (~> 1.0)
      rack (~> 1.0)
      tilt (~> 1.1, != 1.3.0)
    thor (0.18.1)
    tilt (1.4.1)
    tinder (1.9.1)
      eventmachine (>= 0.12.0, < 2)
      faraday (~> 0.8)
      faraday_middleware (~> 0.8)
      hashie (~> 1.0)
      json (~> 1.6)
      mime-types (~> 1.16)
      multi_json (~> 1.0)
      multipart-post (~> 1.1)
      twitter-stream (~> 0.1)
    treetop (1.4.15)
      polyglot
      polyglot (>= 0.3.1)
    turn (0.9.6)
      ansi
    twitter-stream (0.1.16)
      eventmachine (>= 0.12.8)
      http_parser.rb (~> 0.5.1)
      simple_oauth (~> 0.1.4)
    tzinfo (0.3.39)
    uglifier (1.2.3)
      execjs (>= 0.3.0)
      multi_json (>= 1.0.2)
    unicode_utils (1.3.0)
    unicorn (4.2.0)
      kgio (~> 2.6)
      rack
      raindrops (~> 0.7)
    websocket (1.0.6)
    whenever (0.7.3)
      activesupport (>= 2.3.4)
      chronic (~> 0.6.3)
    will_paginate (3.0.3)
    xpath (1.0.0)
      nokogiri (~> 1.3)

PLATFORMS
  ruby

DEPENDENCIES
  active_attr
  authlogic
  capistrano
  capybara
  capybara-webkit!
  coffee-rails (~> 3.2.1)
  exception_notification (= 3.0.0)
  jquery-rails (~> 2.0.1)
  launchy
  letter_opener!
  mail_view!
  marginalia
  meta_request (= 0.2.1)
  minitest-rails
  minitest-rails-capybara
  nokogiri
  pg
  premailer!
  premailer-rails3
  psych
  quiet_assets
  rails (= 3.2.17)
  sass (= 3.2.6)
  sass-rails (~> 3.2.3)
  sheets
  snapshot!
  turn
  uglifier (>= 1.0.3)
  unicode_utils
  unicorn
  whenever
  will_paginate

What causes this errors?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

It is a known bug with the current release of Sass, updating the sass stylesheet will cause the caching error because of the Sprockets importer not serializing correctly. For the bug report see this.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...