assets:预编译到达文件的末尾

时间:2013-10-24 20:48:43

标签: ruby-on-rails ruby capistrano asset-pipeline

我正在尝试在我的Rails 4应用程序上运行assets:precompile,但我一直在这样做:

rake aborted!
end of file reached

我在我的VPS上运行此命令后,capistrano抱怨同样的错误。有什么想法吗?

[deploy@skateboxes skateboxes]$ cd /var/www/skateboxes/releases/20131024204508 && ( RAILS_ENV=production /usr/local/rvm/bin/skateboxes_rake assets:precompile )
rake aborted!
end of file reached
/var/www/skateboxes/shared/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/core_ext/marshal.rb:6:in `load'
/var/www/skateboxes/shared/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/core_ext/marshal.rb:6:in `load_with_autoloading'
/var/www/skateboxes/shared/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/cache/file_store.rb:19:in `block in []'
/var/www/skateboxes/shared/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/cache/file_store.rb:19:in `open'
/var/www/skateboxes/shared/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/cache/file_store.rb:19:in `open'
/var/www/skateboxes/shared/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/cache/file_store.rb:19:in `[]'
/var/www/skateboxes/shared/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/caching.rb:14:in `cache_get'
/var/www/skateboxes/shared/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/caching.rb:84:in `cache_get_hash'
/var/www/skateboxes/shared/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/caching.rb:54:in `cache_asset'
/var/www/skateboxes/shared/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/index.rb:93:in `build_asset'
/var/www/skateboxes/shared/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/base.rb:287:in `find_asset'
/var/www/skateboxes/shared/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/index.rb:61:in `find_asset'
/var/www/skateboxes/shared/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/manifest.rb:211:in `block in find_asset'
/var/www/skateboxes/shared/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/manifest.rb:257:in `benchmark'
/var/www/skateboxes/shared/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/manifest.rb:210:in `find_asset'
/var/www/skateboxes/shared/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/manifest.rb:119:in `block in compile'
/var/www/skateboxes/shared/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/manifest.rb:118:in `each'
/var/www/skateboxes/shared/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/manifest.rb:118:in `compile'
/var/www/skateboxes/shared/bundle/ruby/2.0.0/gems/sprockets-rails-2.0.1/lib/sprockets/rails/task.rb:60:in `block (3 levels) in define'
/var/www/skateboxes/shared/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/rake/sprocketstask.rb:146:in `with_logger'
/var/www/skateboxes/shared/bundle/ruby/2.0.0/gems/sprockets-rails-2.0.1/lib/sprockets/rails/task.rb:59:in `block (2 levels) in define'
Tasks: TOP => assets:precompile
(See full trace by running task with --trace)

1 个答案:

答案 0 :(得分:12)

当缓存目录中存在无法解组的文件时,可能会发生这种情况。尝试清理临时目录。

https://github.com/sstephenson/sprockets/blob/v2.10.0/lib/sprockets/cache/file_store.rb