2010-12-16 40 views
0

已安装/配置RSpec 2.3.0的新rails项目创建了一个模型。当我运行rake spec时,它无法加载shared_helpers.rb。有任何想法吗?RSpec shared_helpers问题

/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 

回答

0

通过在Ruby 1.8.7中使用RVM解决了这个问题。我之前使用过系统红宝石。