Spork 错误:未定义方法“split”对于 nil:NilClass (NoMethodError)
知道什么会导致这种情况吗?直到今天,它已经工作了几个月。不确定我改变了什么。
我的机器上有 spork 0.9.0.rc9 gem(OS X 10.7 最新,所有操作系统更新)和 Gemfile(Rails 3.1.1)中。当我尝试运行 spork --bootstrap 时,出现以下错误:
undefined method 'split' for nil:NilClass (NoMethodError)
/Users/mm/.rvm/gems/ruby-1.9.2-p190/gems/spork-0.9.0.rc9/lib/spork/gem_helpers.rb:10:in 'initialize'
/Users/mm/.rvm/gems/ruby-1.9.2-p190/gems/spork-0.9.0.rc9/lib/spork/gem_helpers.rb:25:in 'new'
/Users/mm/.rvm/gems/ruby-1.9.2-p190/gems/spork-0.9.0.rc9/lib/spork/gem_helpers.rb:25:in 'block in latest_load_paths'
/Users/mm/.rvm/gems/ruby-1.9.2-p190/gems/spork-0.9.0.rc9/lib/spork/gem_helpers.rb:24:in 'each'
/Users/mm/.rvm/gems/ruby-1.9.2-p190/gems/spork-0.9.0.rc9/lib/spork/gem_helpers.rb:24:in 'inject'
/Users/mm/.rvm/gems/ruby-1.9.2-p190/gems/spork-0.9.0.rc9/lib/spork/gem_helpers.rb:24:in 'latest_load_paths'
/Users/mm/.rvm/gems/ruby-1.9.2-p190/gems/spork-0.9.0.rc9/lib/spork.rb:108:in 'other_spork_gem_load_paths'
/Users/mm/.rvm/gems/ruby-1.9.2-p190/gems/spork-0.9.0.rc9/lib/spork.rb:101:in 'detect_and_require'
/Users/mm/.rvm/gems/ruby-1.9.2-p190/gems/spork-0.9.0.rc9/lib/spork/test_framework.rb:167:in ''
/Users/mm/.rvm/gems/ruby-1.9.2-p190/gems/spork-0.9.0.rc9/lib/spork/runner.rb:49:in 'find_test_framework'
/Users/mm/.rvm/gems/ruby-1.9.2-p190/gems/spork-0.9.0.rc9/lib/spork/runner.rb:57:in 'run'
/Users/mm/.rvm/gems/ruby-1.9.2-p190/gems/spork-0.9.0.rc9/lib/spork/runner.rb:10:in 'run'
/Users/mm/.rvm/gems/ruby-1.9.2-p190/gems/spork-0.9.0.rc9/bin/spork:10:in ''
/Users/mm/.rvm/gems/ruby-1.9.2-p190/bin/spork:19:in 'load'
/Users/mm/.rvm/gems/ruby-1.9.2-p190/bin/spork:19:in ''
Any idea what would cause this? It's been working for months until today. Not sure what I changed.
I have the spork 0.9.0.rc9 gem on my machine (OS X 10.7 up to date with all os updates) and in my Gemfile (Rails 3.1.1). When I try to run spork --bootstrap I get the following error:
undefined method 'split' for nil:NilClass (NoMethodError)
/Users/mm/.rvm/gems/ruby-1.9.2-p190/gems/spork-0.9.0.rc9/lib/spork/gem_helpers.rb:10:in 'initialize'
/Users/mm/.rvm/gems/ruby-1.9.2-p190/gems/spork-0.9.0.rc9/lib/spork/gem_helpers.rb:25:in 'new'
/Users/mm/.rvm/gems/ruby-1.9.2-p190/gems/spork-0.9.0.rc9/lib/spork/gem_helpers.rb:25:in 'block in latest_load_paths'
/Users/mm/.rvm/gems/ruby-1.9.2-p190/gems/spork-0.9.0.rc9/lib/spork/gem_helpers.rb:24:in 'each'
/Users/mm/.rvm/gems/ruby-1.9.2-p190/gems/spork-0.9.0.rc9/lib/spork/gem_helpers.rb:24:in 'inject'
/Users/mm/.rvm/gems/ruby-1.9.2-p190/gems/spork-0.9.0.rc9/lib/spork/gem_helpers.rb:24:in 'latest_load_paths'
/Users/mm/.rvm/gems/ruby-1.9.2-p190/gems/spork-0.9.0.rc9/lib/spork.rb:108:in 'other_spork_gem_load_paths'
/Users/mm/.rvm/gems/ruby-1.9.2-p190/gems/spork-0.9.0.rc9/lib/spork.rb:101:in 'detect_and_require'
/Users/mm/.rvm/gems/ruby-1.9.2-p190/gems/spork-0.9.0.rc9/lib/spork/test_framework.rb:167:in ''
/Users/mm/.rvm/gems/ruby-1.9.2-p190/gems/spork-0.9.0.rc9/lib/spork/runner.rb:49:in 'find_test_framework'
/Users/mm/.rvm/gems/ruby-1.9.2-p190/gems/spork-0.9.0.rc9/lib/spork/runner.rb:57:in 'run'
/Users/mm/.rvm/gems/ruby-1.9.2-p190/gems/spork-0.9.0.rc9/lib/spork/runner.rb:10:in 'run'
/Users/mm/.rvm/gems/ruby-1.9.2-p190/gems/spork-0.9.0.rc9/bin/spork:10:in ''
/Users/mm/.rvm/gems/ruby-1.9.2-p190/bin/spork:19:in 'load'
/Users/mm/.rvm/gems/ruby-1.9.2-p190/bin/spork:19:in ''
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我有类似的问题。它向我抛出
“NoMethodError: undefined method `query_options' for nil:NilClass
You should move your
to
这应该可以解决问题。
I had the similar problem. It was throwing me
"NoMethodError: undefined method `query_options' for nil:NilClass
You should move your
to
That should fix the issue.