RSpec shared_helpers 问题
新的 Rails 项目,安装/配置了 RSpec 2.3.0,创建了一个模型。当我运行 rakespec 时,它无法加载shared_helpers.rb。有什么想法吗?
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -S bundle exec rspec "./spec/models/school_spec.rb"
/Library/Ruby/Gems/1.8/gems/bundler-1.0.7/lib/bundler/shared_helpers.rb:2:in `require': no such file to load -- rubygems (LoadError)
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.7/lib/bundler/shared_helpers.rb:2
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.7/lib/bundler/setup.rb:1:in `require'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.7/lib/bundler/setup.rb:1
rake aborted!
ruby -S bundle exec rspec "./spec/models/school_spec.rb" failed
New rails project, installed/configured RSpec 2.3.0, created one model. When I run rake spec, it can't load shared_helpers.rb. Any ideas?
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -S bundle exec rspec "./spec/models/school_spec.rb"
/Library/Ruby/Gems/1.8/gems/bundler-1.0.7/lib/bundler/shared_helpers.rb:2:in `require': no such file to load -- rubygems (LoadError)
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.7/lib/bundler/shared_helpers.rb:2
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.7/lib/bundler/setup.rb:1:in `require'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.7/lib/bundler/setup.rb:1
rake aborted!
ruby -S bundle exec rspec "./spec/models/school_spec.rb" failed
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
通过将 RVM 与 Ruby 1.8.7 结合使用解决了这个问题。我之前使用的是系统 ruby。
Solved this by using RVM with Ruby 1.8.7. I was using system ruby prior.