当前位置:  开发笔记 > 后端 > 正文

无法使用资产重复NilClass on rails rake:precompile

如何解决《无法使用资产重复NilClassonrailsrake:precompile》经验,为你挑选了0个好方法。

当我尝试预编译我的资产时,我收到以下错误.这是具有完整输出的跟踪:

RAILS_ENV=production bundle exec rake assets:precompile --trace
** Invoke assets:precompile (first_time)
** Invoke assets:environment (first_time)
** Execute assets:environment
** Invoke environment (first_time)
** Execute environment
rake aborted!
TypeError: can't dup NilClass
/var/lib/gems/2.3.0/gems/redis-activesupport-5.0.3/lib/active_support/cache/redis_store.rb:38:in `dup'
/var/lib/gems/2.3.0/gems/redis-activesupport-5.0.3/lib/active_support/cache/redis_store.rb:38:in `map'
/var/lib/gems/2.3.0/gems/redis-activesupport-5.0.3/lib/active_support/cache/redis_store.rb:38:in `initialize'
/var/lib/gems/2.3.0/gems/activesupport-5.0.5/lib/active_support/cache.rb:60:in `new'
/var/lib/gems/2.3.0/gems/activesupport-5.0.5/lib/active_support/cache.rb:60:in `lookup_store'
/var/lib/gems/2.3.0/gems/railties-5.0.5/lib/rails/application/bootstrap.rb:64:in `block in '
/var/lib/gems/2.3.0/gems/railties-5.0.5/lib/rails/initializable.rb:30:in `instance_exec'
/var/lib/gems/2.3.0/gems/railties-5.0.5/lib/rails/initializable.rb:30:in `run'
/var/lib/gems/2.3.0/gems/railties-5.0.5/lib/rails/initializable.rb:55:in `block in run_initializers'
/usr/lib/ruby/2.3.0/tsort.rb:228:in `block in tsort_each'
/usr/lib/ruby/2.3.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
/usr/lib/ruby/2.3.0/tsort.rb:431:in `each_strongly_connected_component_from'
/usr/lib/ruby/2.3.0/tsort.rb:349:in `block in each_strongly_connected_component'
/usr/lib/ruby/2.3.0/tsort.rb:347:in `each'
/usr/lib/ruby/2.3.0/tsort.rb:347:in `call'
/usr/lib/ruby/2.3.0/tsort.rb:347:in `each_strongly_connected_component'
/usr/lib/ruby/2.3.0/tsort.rb:226:in `tsort_each'
/usr/lib/ruby/2.3.0/tsort.rb:205:in `tsort_each'
/var/lib/gems/2.3.0/gems/railties-5.0.5/lib/rails/initializable.rb:54:in `run_initializers'
/var/lib/gems/2.3.0/gems/railties-5.0.5/lib/rails/application.rb:352:in `initialize!'
/home/alex/Dev/livingrecipe/config/environment.rb:5:in `'
/var/lib/gems/2.3.0/gems/activesupport-5.0.5/lib/active_support/dependencies.rb:293:in `require'
/var/lib/gems/2.3.0/gems/activesupport-5.0.5/lib/active_support/dependencies.rb:293:in `block in require'
/var/lib/gems/2.3.0/gems/activesupport-5.0.5/lib/active_support/dependencies.rb:259:in `load_dependency'
/var/lib/gems/2.3.0/gems/activesupport-5.0.5/lib/active_support/dependencies.rb:293:in `require'
/var/lib/gems/2.3.0/gems/railties-5.0.5/lib/rails/application.rb:328:in `require_environment!'
/var/lib/gems/2.3.0/gems/railties-5.0.5/lib/rails/application.rb:448:in `block in run_tasks_blocks'
/var/lib/gems/2.3.0/gems/rake-12.0.0/lib/rake/task.rb:250:in `block in execute'
/var/lib/gems/2.3.0/gems/rake-12.0.0/lib/rake/task.rb:250:in `each'
/var/lib/gems/2.3.0/gems/rake-12.0.0/lib/rake/task.rb:250:in `execute'
/var/lib/gems/2.3.0/gems/rake-12.0.0/lib/rake/task.rb:194:in `block in invoke_with_call_chain'
/usr/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize'
/var/lib/gems/2.3.0/gems/rake-12.0.0/lib/rake/task.rb:187:in `invoke_with_call_chain'
/var/lib/gems/2.3.0/gems/rake-12.0.0/lib/rake/task.rb:180:in `invoke'
/var/lib/gems/2.3.0/gems/sprockets-rails-3.2.0/lib/sprockets/rails/task.rb:62:in `block (2 levels) in define'
/var/lib/gems/2.3.0/gems/rake-12.0.0/lib/rake/task.rb:250:in `block in execute'
/var/lib/gems/2.3.0/gems/rake-12.0.0/lib/rake/task.rb:250:in `each'
/var/lib/gems/2.3.0/gems/rake-12.0.0/lib/rake/task.rb:250:in `execute'
/var/lib/gems/2.3.0/gems/rake-12.0.0/lib/rake/task.rb:194:in `block in invoke_with_call_chain'
/usr/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize'
/var/lib/gems/2.3.0/gems/rake-12.0.0/lib/rake/task.rb:187:in `invoke_with_call_chain'
/var/lib/gems/2.3.0/gems/rake-12.0.0/lib/rake/task.rb:216:in `block in invoke_prerequisites'
/var/lib/gems/2.3.0/gems/rake-12.0.0/lib/rake/task.rb:214:in `each'
/var/lib/gems/2.3.0/gems/rake-12.0.0/lib/rake/task.rb:214:in `invoke_prerequisites'
/var/lib/gems/2.3.0/gems/rake-12.0.0/lib/rake/task.rb:193:in `block in invoke_with_call_chain'
/usr/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize'
/var/lib/gems/2.3.0/gems/rake-12.0.0/lib/rake/task.rb:187:in `invoke_with_call_chain'
/var/lib/gems/2.3.0/gems/rake-12.0.0/lib/rake/task.rb:180:in `invoke'
/var/lib/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:152:in `invoke_task'
/var/lib/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:108:in `block (2 levels) in top_level'
/var/lib/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:108:in `each'
/var/lib/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:108:in `block in top_level'
/var/lib/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:117:in `run_with_threads'
/var/lib/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:102:in `top_level'
/var/lib/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:80:in `block in run'
/var/lib/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:178:in `standard_exception_handling'
/var/lib/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:77:in `run'
/var/lib/gems/2.3.0/gems/rake-12.0.0/exe/rake:27:in `'
/usr/local/bin/rake:23:in `load'
/usr/local/bin/rake:23:in `
'

所以不幸的是我无法弄清楚错误指向的位置,因为没有代码是我的东西,主要是跟踪由默认宝石的代码组成.我可以看到我在其中添加的一件事是引导宝石,但即使我把它拿出来也会发生同样的事情.

推荐阅读
linjiabin43
这个屌丝很懒,什么也没留下!
DevBox开发工具箱 | 专业的在线开发工具网站    京公网安备 11010802040832号  |  京ICP备19059560号-6
Copyright © 1998 - 2020 DevBox.CN. All Rights Reserved devBox.cn 开发工具箱 版权所有