rspec始终返回错误

时间:2011-11-11 17:03:53

标签: ruby-on-rails rubygems rspec

我跑:

$ bundle exec rspec spec/

并收到此消息:

C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rspec-core-2.0.1/lib/rspec/core.rb:78:in `require': no such file to load -- rspec/expectations (LoadError) 
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rspec-core-2.0 .1/lib/rspec/core.rb:78:in `<top (required)>' from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rspec-core-2.0 .1/lib/rspec/autorun.rb:1:in `require'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rspec-core-2.0.1/lib/rspec/autorun.rb:1:in `<top (required)>'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rspec-core-2.0.1/bin/rspec:2:in `require'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rspec-core-2.0.1/bin/rspec:2:in `<top (required)>'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/bin/rspec:19:in `load'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/bin/rspec:19:in `<main>'

在我的Gemfile中:

group :development do
gem 'rspec-core', '2.0.1'
gem 'annotate', :git => 'git://github.com/ctran/annotate_models.git'
end

为了运行rspec我需要做什么?

1 个答案:

答案 0 :(得分:2)

rspec-rails,安装核心,以及rspec所需的其他内容。

http://rubydoc.info/gems/rspec-rails/frames