耙子流产了! nil的未定义方法`mtime':NilClass

时间:2013-05-10 15:29:48

标签: ruby-on-rails passenger joosy

我正在点击

rake aborted! 
undefined method `mtime' for nil:NilClass 
尝试使用Phusion Passenger预编译Rails / Joosy / Foundation 4应用程序时出现

错误。

我使用的命令是

  bundle exec rake assets:precompile

我已经尝试了grep -r“mtime”,它花了很长时间,似乎没有返回任何东西(虽然我没有让它完成)并且搜索我的本地文件的同一个术语没有返回任何内容。

ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-linux]
Rails 3.2.13
Phusion Passenger version 4.0.2

完整跟踪如下。其他可能有用的东西请告诉我。

感谢。

$ bundle exec rake assets:precompile
/home/entracked/.rvm/rubies/ruby-1.9.3-p392/bin/ruby /home/entracked/.rvm/gems/ruby- 1.9.3-p392@global/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets
rake aborted!
undefined method `mtime' for nil:NilClass
/home/entracked/.rvm/gems/ruby-1.9.3-p392@hub_blog/gems/sprockets-2.2.2/lib/sprockets/processed_asset.rb:128:in `block in build_dependency_paths'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@hub_blog/gems/sprockets-2.2.2/lib/sprockets/processed_asset.rb:127:in `build_dependency_paths'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@hub_blog/gems/sprockets-2.2.2/lib/sprockets/processed_asset.rb:17:in `initialize'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@hub_blog/gems/sprockets-2.2.2/lib/sprockets/base.rb:249:in `new'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@hub_blog/gems/sprockets-2.2.2/lib/sprockets/base.rb:249:in `block in build_asset'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@hub_blog/gems/sprockets-2.2.2/lib/sprockets/base.rb:270:in `circular_call_protection'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@hub_blog/gems/sprockets-2.2.2/lib/sprockets/base.rb:248:in `build_asset'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@hub_blog/gems/sprockets-2.2.2/lib/sprockets/index.rb:93:in `block in build_asset'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@hub_blog/gems/sprockets-2.2.2/lib/sprockets/caching.rb:19:in `cache_asset'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@hub_blog/gems/sprockets-2.2.2/lib/sprockets/index.rb:92:in `build_asset'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@hub_blog/gems/sprockets-2.2.2/lib/sprockets/base.rb:169:in `find_asset'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@hub_blog/gems/sprockets-2.2.2/lib/sprockets/index.rb:60:in `find_asset'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@hub_blog/gems/sprockets-2.2.2/lib/sprockets/bundled_asset.rb:16:in `initialize'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@hub_blog/gems/sprockets-2.2.2/lib/sprockets/base.rb:252:in `new'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@hub_blog/gems/sprockets-2.2.2/lib/sprockets/base.rb:252:in `build_asset'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@hub_blog/gems/sprockets-2.2.2/lib/sprockets/index.rb:93:in `block in build_asset'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@hub_blog/gems/sprockets-2.2.2/lib/sprockets/caching.rb:19:in `cache_asset'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@hub_blog/gems/sprockets-2  .2.2/lib/sprockets/index.rb:92:in `build_asset'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@hub_blog/gems/sprockets-2.2.2/lib/sprockets/base.rb:169:in `find_asset'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@hub_blog/gems/sprockets-2.2.2/lib/sprockets/index.rb:60:in `find_asset'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@hub_blog/gems/actionpack-3.2.13/lib/sprockets/static_compiler.rb:19:in `block in compile'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@hub_blog/gems/sprockets-2.2.2/lib/sprockets/base.rb:219:in `block in each_logical_path'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@hub_blog/gems/sprockets-2.2.2/lib/sprockets/base.rb:206:in `block (2 levels) in each_file'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@hub_blog/gems/sprockets-2.2.2/lib/sprockets/base.rb:196:in `each'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@hub_blog/gems/sprockets-2.2.2/lib/sprockets/base.rb:196:in `each_entry'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@hub_blog/gems/sprockets-2.2.2/lib/sprockets/base.rb:204:in `block in each_file'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@hub_blog/gems/sprockets-2.2.2/lib/sprockets/base.rb:203:in `each'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@hub_blog/gems/sprockets-2.2.2/lib/sprockets/base.rb:203:in `each_file'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@hub_blog/gems/sprockets-2.2.2/lib/sprockets/base.rb:217:in `each_logical_path'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@hub_blog/gems/actionpack-3.2.13/lib/sprockets/static_compiler.rb:18:in `compile'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@hub_blog/gems/actionpack-3.2.13/lib/sprockets/assets.rake:56:in `internal_precompile'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@hub_blog/gems/actionpack-3.2.13/lib/sprockets/assets.rake:70:in `block (3 levels) in <top (required)>'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/task.rb:246:in `call'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/task.rb:246:in `block in execute'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/task.rb:241:in `each'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/task.rb:241:in `execute'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/task.rb:184:in `block in invoke_with_call_chain'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/task.rb:177:in `invoke_with_call_chain'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/task.rb:170:in `invoke'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@hub_blog/gems/actionpack-3.2.13/lib/sprockets/assets.rake:60:in `block (3 levels) in <top (required)>'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/task.rb:246:in `call'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/task.rb:246:in `block in execute'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/task.rb:241:in `each'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/task.rb:241:in `execute'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/task.rb:184:in `block in invoke_with_call_chain'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/task.rb:177:in `invoke_with_call_chain'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/task.rb:170:in `invoke'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/application.rb:143:in `invoke_task'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/application.rb:101:in `block (2 levels) in top_level'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/application.rb:101:in `each'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/application.rb:101:in `block in top_level'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/application.rb:110:in `run_with_threads'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/application.rb:95:in `top_level'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/application.rb:73:in `block in run'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/application.rb:160:in `standard_exception_handling'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/application.rb:70:in `run'
Tasks: TOP => assets:precompile:primary
(See full trace by running task with --trace)

Command failed with status (1): [/home/entracked/.rvm/rubies/ruby-1.9.3-p39...]
/home/entracked/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/file_utils.rb:53:in `block in create_shell_runner'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/file_utils.rb:45:in `call'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/file_utils.rb:45:in `sh'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/file_utils_ext.rb:37:in `sh'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/file_utils.rb:80:in `ruby'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/file_utils_ext.rb:37:in `ruby'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@hub_blog/gems/actionpack-3.2.13/lib/sprockets/assets.rake:12:in `ruby_rake_task'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@hub_blog/gems/actionpack-3.2.13/lib/sprockets/assets.rake:21:in `invoke_or_reboot_rake_task'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@hub_blog/gems/actionpack-3.2.13/lib/sprockets/assets.rake:29:in `block (2 levels) in <top (required)>'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/task.rb:246:in `call'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/task.rb:246:in `block in execute'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/task.rb:241:in `each'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/task.rb:241:in `execute'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/task.rb:184:in `block in invoke_with_call_chain'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/task.rb:177:in `invoke_with_call_chain'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/task.rb:170:in `invoke'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/application.rb:143:in `invoke_task'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/application.rb:101:in `block (2 levels) in top_level'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/application.rb:101:in `each'
 /home/entracked/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/application.rb:101:in `block in top_level'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/application.rb:110:in `run_with_threads'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/application.rb:95:in `top_level'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/application.rb:73:in `block in run'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/application.rb:160:in `standard_exception_handling'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/application.rb:70:in `run'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@hub_blog/bin/ruby_noexec_wrapper:14:in `eval'
/home/entracked/.rvm/gems/ruby-1.9.3-p392@hub_blog/bin/ruby_noexec_wrapper:14:in `<main>'
Tasks: TOP => assets:precompile

修改

所以进一步阅读使我认为它与https://github.com/sstephenson/sprockets/issues/141有关,它基本上说错误信息不是很有用,但这可能与application.js中的require_tree清单有关。

我不太确定发生了什么,但我想知道我的遗失是否有什么东西

//= require jquery
//= require jquery_ujs
//= require foundation
//= require_tree .

$(document).foundation();

也尝试添加此行

//= require_tree ./blog 

因为我在assets / javascripts / blog中创建了一个joosy.ws(前端js框架)应用程序。不确定默认情况下是否包含此项。这两种选择似乎都无法解决问题。

0 个答案:

没有答案