Windows 7 上的 Spork 与 Capybara
这是我的问题:
我已经在我的Windows 7上启动了spork,它工作得很好(设置了2个 magazine_slave_service - 经过多次尝试)。但是,当我运行 bundle exec rspec spec
在另一个控制台上执行 RSpec 测试时,它会给出以下错误消息:
undefined method 'read_all' for nil:NilClass <NoMethodError>
在 1.8/gems/...../lib/spork/run_strategy/magazine.rb:89:in 'run'
PS:当我运行 rake spec 时,它只是执行预期的操作,当我想使用 spork 来加速我的 BDD 时,我的问题就出现了。
我在 Win7-x86/Ruby1.8.7 上运行 spork。
有什么想法吗?
Here is my problem:
I have started spork on my Windows 7 and it just works fine (2 magazine_slave_service are setup -- after several attempts though). But when I run bundle exec rspec spec
to execute my RSpec tests on another console, it gives me this error message:
undefined method 'read_all' for nil:NilClass <NoMethodError>
It's in 1.8/gems/...../lib/spork/run_strategy/magazine.rb:89:in 'run'
P.S: When I run rake spec
it just does what's expected, my problem shows up when I want to use spork to speed up my BDD.
I'm running spork on Win7-x86/Ruby1.8.7.
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
答案是:
gem 'spork','~> 0.9.0.rc9'
)rspec spec/models
” (对于模型)虽然,一般来说,
spork
似乎在 Windows 中不能正常工作......有时它无法正确分叉进程。它随机工作得很好(至少对我来说!)..你应该一次又一次地尝试让它工作。And the answer is:
gem 'spork', '> 0.9.0.rc9'
(Instead ofgem 'spork', '~> 0.9.0.rc9'
)rspec spec/models
" (for models)Although, in general
spork
seems like doesn't work fine in windows ..sometimes it can't fork the processes properly. It works fine randomly (at least for me!)..You should try again and again to get it working.