当我尝试预编译资产时,我的rails应用程序出现以下错误。通过跟踪说明如下:
$ RAILS_ENV=production rake assets:precompile --trace
** Invoke assets:precompile (first_time)
** Invoke assets:environment (first_time)
** Execute assets:environment
** Invoke environment (first_time)
** Execute environment
** Execute assets:precompile
rake aborted!
ArgumentError: Unmatched double quote: "asset_path \"favicon.ico\" %>',"
/Users/admin/.rbenv/versions/2.3.1/lib/ruby/2.3.0/shellwords.rb:83:in `block in shellsplit'
/Users/admin/.rbenv/versions/2.3.1/lib/ruby/2.3.0/shellwords.rb:81:in `scan'
/Users/admin/.rbenv/versions/2.3.1/lib/ruby/2.3.0/shellwords.rb:81:in `shellsplit'
/Users/admin/projects/RoR/bubblin/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.0/lib/sprockets/directive_processor.rb:142:in `block in extract_directives'
/Users/admin/projects/RoR/bubblin/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.0/lib/sprockets/directive_processor.rb:140:in `each'
/Users/admin/projects/RoR/bubblin/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.0/lib/sprockets/directive_processor.rb:140:in `each_with_index'
/Users/admin/projects/RoR/bubblin/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.0/lib/sprockets/directive_processor.rb:140:in `extract_directives'
/Users/admin/projects/RoR/bubblin/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.0/lib/sprockets/directive_processor.rb:117:in `process_source'
/Users/admin/projects/RoR/bubblin/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.0/lib/sprockets/directive_processor.rb:82:in `_call'
/Users/admin/projects/RoR/bubblin/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.0/lib/sprockets/directive_processor.rb:68:in `call'
/Users/admin/projects/RoR/bubblin/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.0/lib/sprockets/processor_utils.rb:75:in `call_processor'
/Users/admin/projects/RoR/bubblin/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.0/lib/sprockets/processor_utils.rb:57:in `block in call_processors'
/Users/admin/projects/RoR/bubblin/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.0/lib/sprockets/processor_utils.rb:56:in `reverse_each'
/Users/admin/projects/RoR/bubblin/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.0/lib/sprockets/processor_utils.rb:56:in `call_processors'
/Users/admin/projects/RoR/bubblin/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.0/lib/sprockets/loader.rb:134:in `load_from_unloaded'
/Users/admin/projects/RoR/bubblin/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.0/lib/sprockets/loader.rb:60:in `block in load'
/Users/admin/projects/RoR/bubblin/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.0/lib/sprockets/loader.rb:317:in `fetch_asset_from_dependency_cache'
/Users/admin/projects/RoR/bubblin/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.0/lib/sprockets/loader.rb:44:in `load'
/Users/admin/projects/RoR/bubblin/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.0/lib/sprockets/cached_environment.rb:20:in `block in initialize'
/Users/admin/projects/RoR/bubblin/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.0/lib/sprockets/cached_environment.rb:47:in `load'
/Users/admin/projects/RoR/bubblin/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.0/lib/sprockets/bundle.rb:23:in `block in call'
/Users/admin/projects/RoR/bubblin/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.0/lib/sprockets/utils.rb:196:in `dfs'
/Users/admin/projects/RoR/bubblin/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.0/lib/sprockets/bundle.rb:24:in `call'
/Users/admin/projects/RoR/bubblin/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.0/lib/sprockets/processor_utils.rb:75:in `call_processor'
/Users/admin/projects/RoR/bubblin/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.0/lib/sprockets/processor_utils.rb:57:in `block in call_processors'
/Users/admin/projects/RoR/bubblin/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.0/lib/sprockets/processor_utils.rb:56:in `reverse_each'
/Users/admin/projects/RoR/bubblin/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.0/lib/sprockets/processor_utils.rb:56:in `call_processors'
/Users/admin/projects/RoR/bubblin/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.0/lib/sprockets/loader.rb:134:in `load_from_unloaded'
/Users/admin/projects/RoR/bubblin/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.0/lib/sprockets/loader.rb:60:in `block in load'
/Users/admin/projects/RoR/bubblin/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.0/lib/sprockets/loader.rb:317:in `fetch_asset_from_dependency_cache'
/Users/admin/projects/RoR/bubblin/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.0/lib/sprockets/loader.rb:44:in `load'
/Users/admin/projects/RoR/bubblin/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.0/lib/sprockets/cached_environment.rb:20:in `block in initialize'
/Users/admin/projects/RoR/bubblin/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.0/lib/sprockets/cached_environment.rb:47:in `load'
/Users/admin/projects/RoR/bubblin/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.0/lib/sprockets/base.rb:66:in `find_asset'
/Users/admin/projects/RoR/bubblin/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.0/lib/sprockets/base.rb:73:in `find_all_linked_assets'
/Users/admin/projects/RoR/bubblin/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.0/lib/sprockets/manifest.rb:134:in `block in find'
/Users/admin/projects/RoR/bubblin/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.0/lib/sprockets/manifest.rb:133:in `each'
/Users/admin/projects/RoR/bubblin/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.0/lib/sprockets/manifest.rb:133:in `find'
/Users/admin/projects/RoR/bubblin/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.0/lib/sprockets/manifest.rb:185:in `compile'
/Users/admin/projects/RoR/bubblin/vendor/bundle/ruby/2.3.0/gems/sprockets-rails-3.2.0/lib/sprockets/rails/task.rb:68:in `block (3 levels) in define'
/Users/admin/projects/RoR/bubblin/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.0/lib/rake/sprocketstask.rb:147:in `with_logger'
/Users/admin/projects/RoR/bubblin/vendor/bundle/ruby/2.3.0/gems/sprockets-rails-3.2.0/lib/sprockets/rails/task.rb:67:in `block (2 levels) in define'
在此处拆分跟踪因为stackoverflow需要更多关于“代码”的单词。
/Users/admin/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rake-11.2.2/lib/rake/task.rb:248:in `block in execute'
/Users/admin/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rake-11.2.2/lib/rake/task.rb:243:in `each'
/Users/admin/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rake-11.2.2/lib/rake/task.rb:243:in `execute'
/Users/admin/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rake-11.2.2/lib/rake/task.rb:187:in `block in invoke_with_call_chain'
/Users/admin/.rbenv/versions/2.3.1/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize'
/Users/admin/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rake-11.2.2/lib/rake/task.rb:180:in `invoke_with_call_chain'
/Users/admin/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rake-11.2.2/lib/rake/task.rb:173:in `invoke'
/Users/admin/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rake-11.2.2/lib/rake/application.rb:152:in `invoke_task'
/Users/admin/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rake-11.2.2/lib/rake/application.rb:108:in `block (2 levels) in top_level'
/Users/admin/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rake-11.2.2/lib/rake/application.rb:108:in `each'
/Users/admin/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rake-11.2.2/lib/rake/application.rb:108:in `block in top_level'
/Users/admin/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rake-11.2.2/lib/rake/application.rb:117:in `run_with_threads'
/Users/admin/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rake-11.2.2/lib/rake/application.rb:102:in `top_level'
/Users/admin/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rake-11.2.2/lib/rake/application.rb:80:in `block in run'
/Users/admin/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rake-11.2.2/lib/rake/application.rb:178:in `standard_exception_handling'
/Users/admin/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rake-11.2.2/lib/rake/application.rb:77:in `run'
/Users/admin/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rake-11.2.2/exe/rake:27:in `<top (required)>'
/Users/admin/.rbenv/versions/2.3.1/bin/rake:22:in `load'
/Users/admin/.rbenv/versions/2.3.1/bin/rake:22:in `<main>'
Tasks: TOP => assets:precompile
奇怪;离开它一个月,在此期间会出现问题。