Spork 错误:未定义方法“split”对于 nil:NilClass (NoMethodError)

发布于 2024-12-19 22:06:04 字数 1629 浏览 1 评论 0原文

知道什么会导致这种情况吗?直到今天,它已经工作了几个月。不确定我改变了什么。

我的机器上有 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

一页 2024-12-26 22:06:04

我有类似的问题。它向我抛出

“NoMethodError: undefined method `query_options' for nil:NilClass

You should move your

Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}

to

Spork.each_run do

end

这应该可以解决问题。

I had the similar problem. It was throwing me

"NoMethodError: undefined method `query_options' for nil:NilClass

You should move your

Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}

to

Spork.each_run do

end

That should fix the issue.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文