运行时出现“Sprockets :: FileNotFound:找不到文件'term'”问题 -
佣金资产:预编译
这是完整的错误。
[chitra@localhost develop]$ rake assets:precompile
rake aborted!
Sprockets::FileNotFound: couldn't find file 'term'
(in /home/chitra/.rvm/gems/ruby-2.2.0@upgrade/gems/web-console-2.0.0/lib/assets/javascripts/web_console.js:1)
/home/chitra/.rvm/gems/ruby-2.2.0@upgrade/gems/sprockets-2.12.3/lib/sprockets/context.rb:106:in `resolve'
/home/chitra/.rvm/gems/ruby-2.2.0@upgrade/gems/sprockets-2.12.3/lib/sprockets/context.rb:146:in `require_asset'
/home/chitra/.rvm/gems/ruby-2.2.0@upgrade/gems/sprockets-2.12.3/lib/sprockets/directive_processor.rb:217:in `process_require_directive'
/home/chitra/.rvm/gems/ruby-2.2.0@upgrade/gems/sprockets-2.12.3/lib/sprockets/directive_processor.rb:167:in `block in process_directives'
/home/chitra/.rvm/gems/ruby-2.2.0@upgrade/gems/sprockets-2.12.3/lib/sprockets/directive_processor.rb:165:in `each'
/home/chitra/.rvm/gems/ruby-2.2.0@upgrade/gems/sprockets-2.12.3/lib/sprockets/directive_processor.rb:165:in `process_directives'
/home/chitra/.rvm/gems/ruby-2.2.0@upgrade/gems/sprockets-2.12.3/lib/sprockets/directive_processor.rb:99:in `evaluate'
/home/chitra/.rvm/gems/ruby-2.2.0@upgrade/gems/tilt-1.4.1/lib/tilt/template.rb:103:in `render'
/home/chitra/.rvm/gems/ruby-2.2.0@upgrade/gems/sprockets-2.12.3/lib/sprockets/context.rb:197:in `block in evaluate'
/home/chitra/.rvm/gems/ruby-2.2.0@upgrade/gems/sprockets-2.12.3/lib/sprockets/context.rb:194:in `each'
/home/chitra/.rvm/gems/ruby-2.2.0@upgrade/gems/sprockets-2.12.3/lib/sprockets/context.rb:194:in `evaluate'
/home/chitra/.rvm/gems/ruby-2.2.0@upgrade/gems/sprockets-2.12.3/lib/sprockets/processed_asset.rb:12:in `initialize'
/home/chitra/.rvm/gems/ruby-2.2.0@upgrade/gems/sprockets-2.12.3/lib/sprockets/base.rb:374:in `new'
/home/chitra/.rvm/gems/ruby-2.2.0@upgrade/gems/sprockets-2.12.3/lib/sprockets/base.rb:374:in `block in build_asset'
/home/chitra/.rvm/gems/ruby-2.2.0@upgrade/gems/sprockets-2.12.3/lib/sprockets/base.rb:395:in `circular_call_protection'
/home/chitra/.rvm/gems/ruby-2.2.0@upgrade/gems/sprockets-2.12.3/lib/sprockets/base.rb:373:in `build_asset'
/home/chitra/.rvm/gems/ruby-2.2.0@upgrade/gems/sprockets-2.12.3/lib/sprockets/index.rb:94:in `block in build_asset'
/home/chitra/.rvm/gems/ruby-2.2.0@upgrade/gems/sprockets-2.12.3/lib/sprockets/caching.rb:58:in `cache_asset'
/home/chitra/.rvm/gems/ruby-2.2.0@upgrade/gems/sprockets-2.12.3/lib/sprockets/index.rb:93:in `build_asset'
/home/chitra/.rvm/gems/ruby-2.2.0@upgrade/gems/sprockets-2.12.3/lib/sprockets/base.rb:287:in `find_asset'
/home/chitra/.rvm/gems/ruby-2.2.0@upgrade/gems/sprockets-2.12.3/lib/sprockets/index.rb:61:in `find_asset'
/home/chitra/.rvm/gems/ruby-2.2.0@upgrade/gems/sprockets-2.12.3/lib/sprockets/processed_asset.rb:111:in `block in resolve_dependencies'
/home/chitra/.rvm/gems/ruby-2.2.0@upgrade/gems/sprockets-2.12.3/lib/sprockets/processed_asset.rb:105:in `each'
/home/chitra/.rvm/gems/ruby-2.2.0@upgrade/gems/sprockets-2.12.3/lib/sprockets/processed_asset.rb:105:in `resolve_dependencies'
/home/chitra/.rvm/gems/ruby-2.2.0@upgrade/gems/sprockets-2.12.3/lib/sprockets/processed_asset.rb:97:in `build_required_assets'
/home/chitra/.rvm/gems/ruby-2.2.0@upgrade/gems/sprockets-2.12.3/lib/sprockets/processed_asset.rb:16:in `initialize'
/home/chitra/.rvm/gems/ruby-2.2.0@upgrade/gems/sprockets-2.12.3/lib/sprockets/base.rb:374:in `new'
/home/chitra/.rvm/gems/ruby-2.2.0@upgrade/gems/sprockets-2.12.3/lib/sprockets/base.rb:374:in `block in build_asset'
/home/chitra/.rvm/gems/ruby-2.2.0@upgrade/gems/sprockets-2.12.3/lib/sprockets/base.rb:395:in `circular_call_protection'
/home/chitra/.rvm/gems/ruby-2.2.0@upgrade/gems/sprockets-2.12.3/lib/sprockets/base.rb:373:in `build_asset'
/home/chitra/.rvm/gems/ruby-2.2.0@upgrade/gems/sprockets-2.12.3/lib/sprockets/index.rb:94:in `block in build_asset'
/home/chitra/.rvm/gems/ruby-2.2.0@upgrade/gems/sprockets-2.12.3/lib/sprockets/caching.rb:58:in `cache_asset'
/home/chitra/.rvm/gems/ruby-2.2.0@upgrade/gems/sprockets-2.12.3/lib/sprockets/index.rb:93:in `build_asset'
/home/chitra/.rvm/gems/ruby-2.2.0@upgrade/gems/sprockets-2.12.3/lib/sprockets/base.rb:287:in `find_asset'
/home/chitra/.rvm/gems/ruby-2.2.0@upgrade/gems/sprockets-2.12.3/lib/sprockets/index.rb:61:in `find_asset'
/home/chitra/.rvm/gems/ruby-2.2.0@upgrade/gems/sprockets-2.12.3/lib/sprockets/bundled_asset.rb:16:in `initialize'
/home/chitra/.rvm/gems/ruby-2.2.0@upgrade/gems/sprockets-2.12.3/lib/sprockets/base.rb:377:in `new'
/home/chitra/.rvm/gems/ruby-2.2.0@upgrade/gems/sprockets-2.12.3/lib/sprockets/base.rb:377:in `build_asset'
/home/chitra/.rvm/gems/ruby-2.2.0@upgrade/gems/sprockets-2.12.3/lib/sprockets/index.rb:94:in `block in build_asset'
/home/chitra/.rvm/gems/ruby-2.2.0@upgrade/gems/sprockets-2.12.3/lib/sprockets/caching.rb:58:in `cache_asset'
/home/chitra/.rvm/gems/ruby-2.2.0@upgrade/gems/sprockets-2.12.3/lib/sprockets/index.rb:93:in `build_asset'
/home/chitra/.rvm/gems/ruby-2.2.0@upgrade/gems/sprockets-2.12.3/lib/sprockets/base.rb:287:in `find_asset'
/home/chitra/.rvm/gems/ruby-2.2.0@upgrade/gems/sprockets-2.12.3/lib/sprockets/index.rb:61:in `find_asset'
/home/chitra/.rvm/gems/ruby-2.2.0@upgrade/gems/sprockets-2.12.3/lib/sprockets/manifest.rb:211:in `block in find_asset'
/home/chitra/.rvm/gems/ruby-2.2.0@upgrade/gems/sprockets-2.12.3/lib/sprockets/manifest.rb:257:in `benchmark'
/home/chitra/.rvm/gems/ruby-2.2.0@upgrade/gems/sprockets-2.12.3/lib/sprockets/manifest.rb:210:in `find_asset'
/home/chitra/.rvm/gems/ruby-2.2.0@upgrade/gems/sprockets-2.12.3/lib/sprockets/manifest.rb:119:in `block in compile'
/home/chitra/.rvm/gems/ruby-2.2.0@upgrade/gems/sprockets-2.12.3/lib/sprockets/manifest.rb:118:in `each'
/home/chitra/.rvm/gems/ruby-2.2.0@upgrade/gems/sprockets-2.12.3/lib/sprockets/manifest.rb:118:in `compile'
/home/chitra/.rvm/gems/ruby-2.2.0@upgrade/gems/sprockets-rails-2.2.2/lib/sprockets/rails/task.rb:70:in `block (3 levels) in define'
/home/chitra/.rvm/gems/ruby-2.2.0@upgrade/gems/sprockets-2.12.3/lib/rake/sprocketstask.rb:146:in `with_logger'
/home/chitra/.rvm/gems/ruby-2.2.0@upgrade/gems/sprockets-rails-2.2.2/lib/sprockets/rails/task.rb:69:in `block (2 levels) in define'
/home/chitra/.rvm/gems/ruby-2.2.0@upgrade/bin/ruby_executable_hooks:15:in `eval'
/home/chitra/.rvm/gems/ruby-2.2.0@upgrade/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => assets:precompile
(See full trace by running task with --trace)
我还通过 -
清除资产管道佣金资产:清除
但仍有同样的问题。
请帮助我理解这个问题。
答案 0 :(得分:0)
我认为这可能是因为Web控制台并非设计用于生产,因此通常不会预编译。尝试使用
进行预编译RAILS_ENV=production rake assets:precompile
答案 1 :(得分:0)
确保在运行term
之前已在assets.rb中添加了文件bundle exec rake assets:precompile
答案 2 :(得分:0)
感谢您的解决方案,但问题不同。
Assets文件夹位于公共目录中。现在我删除了它,问题得到了解决。