工厂女孩正在错误的路径中寻找工厂.rb
我试图让 Factory Girl 工作,但是当我运行测试时,我不断收到此错误:
/Users/dm/.rvm/gems/ruby-1.9.2-p180/gems/activesupport-3.1.0.rc4/lib/active_support/dependencies.rb:237:in `require': no such file to load -- .//Users/dm/Projects/volunteers/spec/factories.rb (LoadError)
问题显然是路径前面的 ./ 。但我不明白它是如何到达那里的。有关修复的任何想法吗?
I'm trying to get Factory Girl working, but I keep getting this error when I run my tests:
/Users/dm/.rvm/gems/ruby-1.9.2-p180/gems/activesupport-3.1.0.rc4/lib/active_support/dependencies.rb:237:in `require': no such file to load -- .//Users/dm/Projects/volunteers/spec/factories.rb (LoadError)
The problem is obviously the ./ in front of the path. But I can't figure out how it's getting there. Any ideas on a fix?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
事实证明这是factory_girl 中的一个错误,已在2.0.1 中修复。我只是在我的 gemfile 中强制使用正确的版本,一切都很好。
https://github.com/thoughtbot/factory_girl/issues/153
Turns out it is a bug in factory_girl that was fixed in 2.0.1. I just forced the correct version in my gemfile and all was good.
https://github.com/thoughtbot/factory_girl/issues/153